escape string (addslashes equivalent)
Escape quotes/slashes similarly to addslashes.
Open →JavaScript equivalents for common string, regex, JSON, and formatting operations. Open each dedicated function page for automatic live output and examples.
Viewer Index · Tools Index · 60 functions
Escape quotes/slashes similarly to addslashes.
Open →Convert text bytes to hex.
Open →Decode hexadecimal text to bytes/string.
Open →Convert hexadecimal text to decimal.
Open →Create text from code points.
Open →Read first character code point.
Open →Split text in fixed-size chunks.
Open →Count character frequencies.
Open →Split by delimiter.
Open →Join line items with delimiter.
Open →Compute edit distance.
Open →Format number with separators.
Open →Parse query string.
Open →Estimate string similarity.
Open →Generate soundex code.
Open →Pad string to length.
Open →Replace substring occurrences.
Open →Apply ROT13 substitution.
Open →Strip HTML tags.
Open →Case-insensitive first index.
Open →First index of substring.
Open →Case-insensitive last index.
Open →Last index of substring.
Open →Substring from first case-insensitive match.
Open →Substring from first case-sensitive match.
Open →Return text length.
Open →Compare first N chars.
Open →Convert to lowercase.
Open →Convert to uppercase.
Open →Translate text with mapping rules.
Open →Extract part of string.
Open →Count substring occurrences.
Open →Heuristic syllable split.
Open →Trim whitespace/chars.
Open →Lowercase the first character.
Open →Capitalize first character.
Open →Title-case words.
Open →Format using % placeholders.
Open →Wrap long text to width.
Open →Parse JSON text.
Open →Regex match and group output.
Open →Regex replacement.
Open →Find all regex matches.
Open →Generate MD5 hash.
Open →Format date with token pattern.
Open →Pad start of string.
Open →Pad end of string.
Open →Encode URI component.
Open →Decode URI component.
Open →Encode complete URI.
Open →Decode complete URI.
Open →Escape HTML entities.
Open →Decode HTML entities.
Open →Encode text as Base64.
Open →Decode Base64 text.
Open →Convert to camelCase.
Open →Convert to snake_case.
Open →Convert to kebab-case.
Open →Convert to Title Case.
Open →Convert to Sentence case.
Open →