Free online string tools

Developer string utilities for encoding, escaping, case conversion and regular expressions. Free, with no sign-up, and nothing is uploaded.

String tools 67

Split StringSplit a string into parts by a separator, a regex or a fixed length, one part per line. Convert String to BytesShow the UTF-8 bytes of a string as hexadecimal values. Convert Bytes to StringDecode hexadecimal byte values into a UTF-8 string. Find String LengthFind the length of a string in characters, code units and UTF-8 bytes. URL Encode StringPercent-encode a string for safe use in URLs and query strings. Reverse StringReverse a string so it reads backwards, keeping emoji and combined characters intact. Convert String to NetstringEncode each line as a netstring: length, colon, data and a comma. URL Decode StringDecode a percent-encoded URL string back into readable text. HTML Encode StringEncode &, <, >, quotes and optionally all non-ASCII characters as HTML entities. HTML Decode StringDecode HTML entities such as &amp;amp;, &amp;lt; and &amp;#8364; back into characters. Convert String to Base64Encode a string as Base64 (UTF-8 safe), optionally URL-safe and without padding. Convert Base64 to StringDecode Base64 (standard or URL-safe) back into a UTF-8 string. Convert Netstring to StringDecode one or more netstrings (like 5:hello,) back into plain strings. Escape StringEscape quotes, backslashes, tabs, line breaks and non-ASCII characters with backslash sequences. Unescape StringTurn backslash escape sequences like \n, \t, \" and \u00e9 back into real characters. Generate String from RegexGenerate random strings that match a regular expression, handy for test data. Extract Regex Matches from StringList every match of a regular expression in a string, or a chosen capture group. Test String with RegexCheck whether a regular expression matches each line of text and see the matches. Extract SubstringExtract part of a string by start position and length. Convert String to ImageRender a string as a PNG image in the font size and colors you choose. Printf StringFormat values with a printf-style template using %s, %d, %f, %x and padding like %05.2f. Join StringsJoin lines into one string with a separator, and optionally wrap each item in quotes. Filter StringKeep only the characters you want in a string: letters, digits, whitespace or a custom set. Repeat StringRepeat a string a set number of times with an optional separator. Replace StringReplace every occurrence of a substring (or regex) in a string with something else. Truncate StringShorten a string to a maximum length and add an ellipsis or other ending. Trim StringTrim whitespace, or any characters you choose, from the start and end of a string. Left Pad StringPad the start of a string with a character until it reaches a length, like leftPad or padStart. Right Pad StringPad the end of a string with a character until it reaches a length, like padEnd. Right Align StringRight-align lines of a string within a fixed width. Center StringCenter a string inside a fixed width by padding both sides with a character. Sort StringsSort a list of strings (one per line) alphabetically, naturally, by length or randomly. Rotate StringRotate a string by moving characters from one end to the other, like a circular shift. ROT13 StringEncode or decode a string with ROT13, shifting each letter 13 places in the alphabet. ROT47 StringEncode or decode a string with ROT47, which rotates all printable ASCII characters. Transpose StringTranspose lines of text so columns become rows, like flipping a grid of characters. Slice StringSlice a string between two indexes; negative values count from the end, like JavaScript slice(). Add String PrefixAdd a prefix to the start of a string. Add String SuffixAdd a suffix to the end of a string. Quote StringWrap a string, or each line, in single, double or custom quotes, escaping quotes inside. Unquote StringRemove matching quotes from the start and end of a string or of each line. Convert Spaces to NewlinesPut every word on its own line by replacing spaces with line breaks. Convert Newlines to SpacesReplace every line break with a space to put text on one line. Convert Spaces to TabsReplace groups of spaces with tab characters, such as every 4 leading spaces. Convert Tabs to SpacesReplace tab characters with spaces, aligned to tab stops. Remove Empty Lines from StringDelete empty and whitespace-only lines from a string. Remove All Whitespace from StringDelete every space, tab and line break from a string. Remove String PunctuationRemove punctuation marks from a string while keeping letters, digits and spaces. Count Newlines in StringCount the line breaks in a string, plus empty and non-empty lines. Convert String to OctalConvert a string to octal, three octal digits per UTF-8 byte. Convert Octal to StringDecode octal byte values back into a UTF-8 string. Convert String to DecimalConvert a string to decimal byte values, one per UTF-8 byte. Convert Decimal to StringConvert decimal byte values (0-255) back into a UTF-8 string. Convert String to HexadecimalConvert a string to hexadecimal, two hex digits per UTF-8 byte. Convert Hexadecimal to StringDecode hexadecimal into a UTF-8 string, with or without spaces between bytes. Convert String to ASCIIConvert each character of a string to its decimal ASCII / Unicode code. Convert ASCII to StringTurn decimal ASCII / Unicode codes back into readable text. Change String CaseConvert a string to UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE. Convert String to UppercaseConvert every letter in a string to uppercase. Convert String to LowercaseConvert every letter in a string to lowercase. Randomize String CaseRandomly mix uppercase and lowercase letters in a string, for that mocking-SpongeBob look. Invert String CaseSwap the case of every letter: uppercase becomes lowercase and lowercase becomes uppercase. Convert JSON to StringTurn JSON into a single escaped string literal you can paste into code. JSON Stringify StringTurn text into a JSON string literal with quotes and escapes, ready to paste into JSON. JSON Parse StringParse a JSON string literal and show the raw text with escapes turned into real characters. Convert HTML to StringStrip HTML tags and decode entities to get plain readable text from HTML. Convert XML to StringTurn XML into a single-line escaped string literal for use in code.