addslashes($input)
Escape quotes, backslashes, and null bytes.
Open →Client-side JavaScript implementations of common PHP string, regex, and utility functions. Open each dedicated function page for automatic live output and examples.
Viewer Index · Tools Index · 58 functions
Escape quotes, backslashes, and null bytes.
Open →Convert text/binary content to hexadecimal.
Open →Convert hexadecimal text to decoded bytes/text.
Open →Convert hexadecimal text to decimal.
Open →Create character(s) from code point values.
Open →Split a string into fixed chunks.
Open →Count frequency of characters/code points.
Open →Split string by delimiter.
Open →Decode HTML entities back to text.
Open →Encode special HTML characters and non-ASCII code points.
Open →Encode &, <, > and optional quotes for safe HTML output.
Open →Decode text escaped by htmlspecialchars.
Open →Join list items into one string.
Open →Compute edit distance between strings.
Open →Format a number with separators and decimal precision.
Open →Get code point value of first character.
Open →Parse query-string text into key/value structure.
Open →Compute approximate similarity and percentage.
Open →Generate soundex phonetic code for words.
Open →Pad string left/right/both to target length.
Open →Replace substring occurrences.
Open →Apply ROT13 transformation.
Open →Remove HTML/XML tags with optional allowed list.
Open →Case-insensitive position of first substring.
Open →Case-insensitive substring from first match.
Open →Return string length.
Open →Compare first N characters of two strings.
Open →Position of first substring.
Open →Case-insensitive position of last substring.
Open →Position of last substring.
Open →Case-sensitive substring from first match.
Open →Convert text to lowercase.
Open →Convert text to uppercase.
Open →Translate chars/substrings via mapping rules.
Open →Extract string segment by start/length.
Open →Count occurrences of substring.
Open →Heuristic syllable splitter for words.
Open →Trim whitespace/chars from both sides.
Open →Lowercase the first character.
Open →Uppercase first character.
Open →Uppercase first character of each word.
Open →Format string placeholders with argument list.
Open →Wrap long text to fixed line width.
Open →Parse PHP serialized data (subset support).
Open →Regex match and capture groups.
Open →Decode JSON text to structured output.
Open →Regex replacement in text.
Open →Find all regex matches and groups.
Open →Generate MD5 hash for text input.
Open →Format dates using common PHP tokens.
Open →Approximate charset conversion among browser-supported encodings.
Open →Encode text as quoted-printable.
Open →Encode text as Base64.
Open →Encode input as Base64.
Open →Decode Base64 to text.
Open →Trim left side.
Open →Trim right side.
Open →Remove escaped slashes from text.
Open →