Start a project

Tool 340 of 425 · Escaping

String Escaper & Unescaper

Escapes or unescapes a string for nine contexts, from JSON and SQL to shell and regex.

String Escaper & Unescaper

Your input

Result

Result

    01

    What it does

    Escapes or unescapes a string for nine contexts, from JSON and SQL to shell and regex.

    • JSON, JS, HTML, XML and CSV
    • SQL single quotes and shell quoting
    • Regex special characters
    • \u escapes for non-ASCII

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    Escaped or unescaped text, with a Copy and a Download button on every result.

    • Escape strings
    • JSON
    • SQL

    Why it matters

    A stray quote or newline breaks JSON, opens an SQL injection or splits a shell argument. Each context has its own escaping rules.

    Paste once and pick the target, or reverse an escaped string you found in a log.

    How to use it

    1. Type or paste your input; the example shows the format.
    2. Press Convert. Results also update as you type.
    3. Read the summary line, then the table, notes or output below it.
    4. Copy or download what you need. Nothing leaves this page.

    FAQ

    Is SQL escaping enough to stop injection?

    No. Use parameterised queries. Escaping here is for one-off scripts and fixtures.

    How does shell escaping work?

    It wraps the value in single quotes and turns ' into '\''.

    Is my input uploaded?

    No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

    Can I rely on the result?

    It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk