DecodeBox
Search
K
Guides
SDK Reference
Operations
Playgrounds
Operations Explorer
Auto Detection Lab
Encoding & Decoding Lab
Open DecodeBox
Theme
Menu
ON THIS PAGE
#
Escape string
Escapes the input so it can be pasted into source code as a literal.
ID:
escape-string
Category: Utils
Aliases: string literal, jsesc, quote
#
Arguments
Argument
Type
Default
Constraints
Escape level
option
"Special chars"
Special chars, Everything, Minimal
Escape quote
option
"Single"
Single, Double, Backtick
JSON compatible
boolean
false
ES6 compatible
boolean
true
Uppercase hex
boolean
false