JSON Stringify & Escape

Turn JSON objects or plain text into a single-line escaped string

Collapses JSON data or any multi-line block of text into one escaped string. Handy whenever you need to pass a JSON string as a command-line (CLI) argument, drop it into an environment variable, or embed it as a config file parameter.

도구를 불러오는 중…

🔒 Everything runs 100% in your browser. Your files and input are never uploaded to any server.

How to use

  1. Paste your JSON or plain text into the input box.
  2. Check the options you want — escape double quotes, convert line breaks, and so on.
  3. Copy the single-line escaped result, generated live as you type.

FAQ

Can I escape plain text that isn't JSON?
Yes. Switch to the Raw Text Escape tab and your input is escaped exactly as entered, with no parsing step.
Can I also convert an escaped string back to its original form?
This tool is built specifically for the original-text-to-one-line-escaped-string direction. If you need to go the other way — restoring an escaped string back to plain JSON or text — paste it into the hub's JSON parser/formatter tool, which unescapes it via JSON.parse.
Can I also convert an escaped string back to its original form?
This tool is built specifically for the original-text-to-one-line-escaped-string direction. If you need to go the other way — restoring an escaped string back to plain JSON or text — paste it into the hub's JSON parser/formatter tool, which unescapes it via JSON.parse.

← Back to all tools

See pricingFree chat consult