Échappement / Déséchappement de Chaîne
Échapper et désechapper des chaînes pour HTML, JSON, JavaScript, SQL et plus
Prochaines etapes suggerees
Outils Associés
Encodeur / Decodeur Base64
Encodez rapidement du texte en Base64 ou decodez du Base64 en texte.
Encodeur / Decodeur URL
Encoder et decoder des URL
Encodeur / Décodeur d'Entités HTML
Encodez les caractères spéciaux en entités HTML ou décodez-les
Convertisseur de Base Numérique
Convertir des nombres entre binaire, octal, décimal et hexadécimal
Convertisseur d'Horodatage
Convertir entre horodatages Unix et dates lisibles
Recherche ASCII / Unicode
Rechercher et consulter les codes de caractères ASCII et Unicode
Comment utiliser
Collez ou saisissez du texte
Entrez votre texte, code ou données dans la zone de saisie.
Choisissez les options
Sélectionnez la transformation ou le format que vous souhaitez appliquer.
Copiez le résultat
Copiez la sortie dans votre presse-papiers en un clic.
Pourquoi utiliser cet outil
100 % Gratuit
Aucun coût caché, aucun niveau premium — chaque fonctionnalité est gratuite.
Aucune installation
Fonctionne entièrement dans votre navigateur. Aucun logiciel à télécharger ou installer.
Privé et sécurisé
Vos données ne quittent jamais votre appareil. Rien n'est envoyé sur un serveur.
Fonctionne sur mobile
Entièrement adaptatif — utilisez-le sur votre téléphone, tablette ou ordinateur.
String Escaping and Unescaping for Multiple Formats
Key Takeaways
- String escaping converts special characters into safe representations for their target format — JSON, XML, HTML, and more each have different rules.
- Improper escaping is a leading cause of injection vulnerabilities, parsing errors, and data corruption in web applications.
- All string processing happens entirely in your browser — your text data is never sent to any server.
Every programming language and data format has characters with special meaning that must be escaped when used as literal text. A backslash in JSON, angle brackets in XML, and quotes in CSV all require different escaping strategies. Understanding escape sequences across formats is essential for building robust applications that handle data safely.
Injection attacks from improper escaping account for over 30% of web application vulnerabilities according to OWASP.
Security Impact
Key Concepts
JSON Escape Sequences
JSON requires escaping backslashes, double quotes, and control characters (\n, \t, \r). Unicode characters can be represented as \uXXXX escape sequences.
XML and HTML Escaping
XML uses entity references (& < > " ') while HTML adds hundreds of named entities. CDATA sections offer an alternative to escaping in XML.
URL Percent-Encoding
URLs encode special characters as %XX hex pairs. This is distinct from other escaping methods and follows RFC 3986 rules for reserved and unreserved characters.
Backslash Escaping in Regex
Regular expressions use backslash to escape metacharacters. When regex is embedded in a JSON string, backslashes must be double-escaped.
Pro Tips
Always use your language's built-in serialization functions (JSON.stringify, encodeURIComponent) rather than manual escaping.
Be aware of double-escaping — when embedding escaped strings inside other escaped formats, each layer adds its own escaping.
Test with edge cases: empty strings, strings containing only special characters, null bytes, and Unicode surrogate pairs.
When debugging, unescape layer by layer — URL decode first, then JSON parse, then examine the raw string.
All string escaping and unescaping is performed entirely in your browser. Your text data, which may contain sensitive content, is never transmitted to any external server.