Percent triplets represent UTF-8 bytes
Unsafe characters are converted to UTF-8 and written as percent followed by two hexadecimal digits per byte. Non-ASCII characters can therefore produce several percent triplets.
Encode special characters for URLs or decode percent-encoded URL strings.
Enter the URL or string to encode or decode.
Select encode to percent-encode or decode to restore the URL.
Click copy to grab the encoded or decoded URL string.
Use this page for values that belong inside a URL, such as a query parameter, path segment, or fragment value. The encoder uses encodeURIComponent, which escapes reserved punctuation as well as spaces. It is intentionally stricter than encoding a complete URL because separators such as slash, question mark, ampersand, and equals may be data inside a component.
A concrete input and expected output from the current implementation.
Input
honey & tea
Expected output
honey%20%26%20tea
Each space becomes %20 and the ampersand becomes %26. Decoding the result returns the original eleven-character value.
Unsafe characters are converted to UTF-8 and written as percent followed by two hexadecimal digits per byte. Non-ASCII characters can therefore produce several percent triplets.
Encoding a whole URL with encodeURIComponent also escapes its structural separators. Enter only the value that needs escaping unless you deliberately want the complete URL represented as data.
Ampersand separates query parameters in a URL. Encoding it as %26 keeps it inside one parameter value instead of starting another parameter.
Inside one path segment, usually yes. Between path segments, no. Decide whether the slash is data or part of the URL structure before encoding.
The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.
Format, validate, and beautify JSON with syntax highlighting and error detection.
Encode text or files to Base64 and decode Base64 strings back to their original form.
Format and indent SQL queries for better readability across all major dialects.
Convert HTML markup into clean Markdown syntax with support for tables and lists.
Write Markdown and see the rendered HTML output in real time with live preview.
Visualize unified diffs and patch files with color-coded additions and deletions.