Text & Encode
Escape strings for JSON, SQL, shell, and regex contexts.
Runs entirely in your browser
Nothing you paste is uploaded. Monaco and Prettier load on demand from this origin.
Context
Raw string
Escaped
"He said \"hi\" & left."
There is no upload endpoint — your files are processed in this browser tab. Open your network tab and check. See how it stays private.
How to string escape tool
- Paste a string. Paste the text to escape or unescape.
- Pick a context. Choose JSON, JS, or another target.
- Copy. Copy the escaped or plain result.
Embedding arbitrary text into code or JSON breaks the moment it contains a quote or newline. Escaping handles those characters so the string stays valid, and unescaping reverses it to read the real content.
For URL contexts use the URL encoder, for HTML use the entity converter, and for whole JSON documents the JSON toolkit.
Frequently asked questions
When do I need to escape a string?
Whenever special characters (quotes, backslashes, newlines) would break the surrounding syntax — pasting multi-line text into a JSON value or a code literal, for example.
Can it unescape a JSON string?
Yes. Paste an escaped value with \n and \" and it returns the original readable text.
Is my text uploaded?
No. Escaping is local string work, so nothing leaves the tab.
Related tools
- JSON toolkitFormat, validate, minify, and explore JSON in a collapsible tree — all in your browser.
- URL encodeEncode or decode URI components without sending data anywhere.
- HTML entitiesEscape or unescape HTML entities for safe markup.
- Case converterConvert text between camelCase, snake_case, kebab-case, and more.