Converters
Text Escape Converter
Encode and decode URL strings, HTML entities, JSON string escapes, Unicode escapes, quoted-printable text, Punycode domains, UTF-8 bytes, and ASCII-safe text locally in your browser.
Tool
Encode and decode URL strings, HTML entities, JSON string escapes, Unicode escapes, quoted-printable text, Punycode domains, UTF-8 bytes, and ASCII-safe text locally in your browser.
This tool runs in your browser. Your input is processed locally and is not uploaded.
About this Tool
Use this free online text escape converter when the same text needs to be represented safely in different contexts: URLs, HTML, JSON strings, Unicode escape notation, quoted-printable email text, international domain names, byte debugging, or ASCII-only systems. Select a format, choose encode or decode, and convert locally in your browser. The tool changes the representation of text for a specific context; it does not change what the text means when decoded correctly.
Examples
- hello world → hello%20world as URL encoded text
- hello%20world → hello world as URL decoded text
- <div>Hello</div> → <div>Hello</div> as HTML entities
- Tom & Jerry → Tom & Jerry as HTML-safe text
- Line 1 / Line 2 → Line 1\nLine 2 as JSON string escape
- ÄÖÜ € 😀 → Unicode escape or ASCII-safe output
- münchen.de → xn--mnchen-3ya.de as Punycode
- Hello € → 48 65 6c 6c 6f 20 e2 82 ac as UTF-8 bytes
- Hello äöü €! → quoted-printable email-safe text
Frequently Asked Questions
When should I use URL encoding?
Use URL encoding when text is placed inside a URL path, query parameter, fragment, or form-style value. Spaces, symbols, and non-ASCII characters are represented with percent escapes so the URL can be parsed safely.
What is the difference between URL encoding and HTML entities?
URL encoding is for URLs and uses percent escapes such as %20. HTML entities are for HTML text and attributes, using forms such as < and & so markup characters display as text.
What is JSON string escaping?
JSON string escaping prepares text for a JSON string value by escaping quotes, backslashes, line breaks, tabs, and control characters. Decode mode can unescape either a full quoted JSON string or raw JSON escape sequences.
What is Unicode escaping?
Unicode escaping writes characters as escape sequences such as \u00e4 or UTF-16 surrogate pairs for emoji. It is useful when a system accepts only plain ASCII characters but still needs to preserve Unicode text.
What is ASCII-safe text?
ASCII-safe output keeps ordinary ASCII characters readable and escapes non-ASCII characters. It is helpful for logs, configuration snippets, legacy systems, and places where non-ASCII characters may be corrupted.
What is quoted-printable used for?
Quoted-printable is an email-oriented encoding that keeps readable ASCII text mostly intact while escaping bytes outside the safe range. It also supports soft line breaks that are removed when decoded.
What is Punycode / IDN used for?
Punycode represents internationalized domain names with ASCII characters. A domain such as münchen.de becomes an xn-- style name that DNS systems and older tools can handle.
What are UTF-8 bytes useful for?
UTF-8 byte output shows the exact bytes behind a string. It is useful for debugging APIs, encodings, file contents, signatures, hashes, and cases where two strings look similar but have different byte values.
Why can decoding fail?
Decoding can fail when the input is incomplete, malformed, or uses escape sequences that do not belong to the selected format. The tool reports invalid input rather than silently producing incorrect text.
Does this tool change the meaning of my text?
No. Encoding changes how the text is represented so it can be safely used in a specific context. Decoding converts that representation back where possible.