Textutils API
All basic text manipulation tools available via URL endpoints.
🚀 Getting Started
Each function is accessed via its own endpoint:
GET https://textutils.onrender.com/FUNCTION?text=INPUT
Each request returns a JSON response like this:
{
"input": "The original input to 'text' parameter",
// Other applicable parameters (length, etc...)
"result": "The transformed output",
}
Example
Request
GET https://textutils.onrender.com/uppercase?text=hello world
Response
{
"input": "hello world",
"result": "HELLO WORLD"
}
All functions take the parameter text
as input.
And some functions require extra parameters.
Available Functions
Text Case
lowercase
: convert all text to lowercaseuppercase
: convert all text to uppercasecapitalize
: capitalize the first charactertitlecase
: capitalize every word
Text Format
camelcase
: convert to camelCasesnakecase
: convert to snake_casekebabcase
: convert to kebab-caseslugify
: create a URL-friendly stringstrip-html
: remove HTML tagsabbreviate
: shorten long text using ellipsisnormalize-whitespace
: replace multiple spaces with a single spaceremove-extra-spaces
: remove extra spaces between words
Length & Trim
trim
: remove surrounding whitespacetruncate
: cut to a maximum length (Extra parameters:length
)repeat
: repeat the string N times (Extra parameters:times
)
Search & Replace
contains
: check if substring is present (Extra parameters:substring
)replace
: swap one string with another (Extra parameters:search
andreplacement
)concat
: concatenate two strings (Extra parameters:otherString
)substring
: extract characters between start and end indexes (Extra parameters:start
,end
)char-at
: get character at specific index (Extra parameter:index
)char-code-at
: get UTF-16 code of character at index (Extra parameter:index
)from-char-code
: convert UTF-16 code(s) to string (Extra parameter:code
)starts-with
: check if string starts with substring (Extra parameter:searchString
)ends-with
: check if string ends with substring (Extra parameter:searchString
)includes
: check if substring exists (Extra parameter:searchString
)split
: split string into array (Extra parameter:separator
)pad-start
: pad string from the start to a target length (Extra parameter:targetLength
,padString
)pad-end
: pad string from the end to a target length (Extra parameter:targetLength
,padString
)replace-all
: replace all occurrences of substring (Extra parameter:search
,replacement
)
Count
wordcount
: number of wordssentencecount
: number of sentencesavg-word-length
: average word lengthcharcount
: number of characterscharcount-no-spaces
: character count without spaces
Encoding & Decoding
encode-base64
: encode text to base64decode-base64
: decode from base64encode-uri
: URI encodedecode-uri
: URI decoderot13
: apply ROT13 cipher
Validation
is-alpha
: check if text has only alphabetic charactersis-numeric
: check if text is numericis-alphanumeric
: check if text is alphanumerichas-emoji
: check if string contains emoji
Transform
reverse
: reverse the stringremove-punctuation
: strip punctuationadd-leading-zeroes
: pad the beginning of the string with zeroes until it reaches a total length (Extra parameter:totalLength
)remove-leading-zeroes
: remove all zeroes from the beginning of the string (unless the string is "0")split-lines
: split text into an array of lines using newline characters (\n
or\r\n
)
Conversion
to-binary
: convert a decimal number to binary stringfrom-binary
: convert a binary string to decimal numberto-hex
: convert a decimal number to hexadecimal stringfrom-hex
: convert a hexadecimal string to decimal numberto-octal
: convert a decimal number to octal stringfrom-octal
: convert an octal string to decimal numberbit-length
: calculate the number of bits needed to represent a number in binarystring-to-hex
: convert a string to its hexadecimal representationhex-to-string
: convert a hexadecimal-encoded string back to plain textascii-codes
: convert each character in the input string to its ASCII code