POST/v1/text/sentence-count1 credit / call
Sentence counter
Count sentences in text using terminal punctuation (. ! ?).
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to analyze. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/sentence-count \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"Hi there! How are you? Fine."}'
Response
{
"ok": true,
"data": {
"count": 3
}
}
POST/v1/text/line-count1 credit / call
Line counter
Count total, non-empty and blank lines in text.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to analyze. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/line-count \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"a\n\nb"}'
Response
{
"ok": true,
"data": {
"total": 3,
"nonEmpty": 2,
"blank": 1
}
}
POST/v1/text/dedupe-lines1 credit / call
Remove duplicate lines
Remove duplicate lines from text, keeping either the first or last occurrence.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to deduplicate. |
| caseInsensitive | boolean | No | Compare lines case-insensitively. Default: false. |
| trimCompare | boolean | No | Ignore leading/trailing whitespace when comparing. Default: false. |
| keep | string | No | first | last. Default: first. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/dedupe-lines \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"a\nb\na"}'
Response
{
"ok": true,
"data": {
"result": "a\nb"
}
}
POST/v1/text/sort-lines1 credit / call
Sort lines
Sort lines alphabetically, by length, numerically, or reverse their order.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to sort. |
| mode | string | No | alpha-asc | alpha-desc | length-asc | length-desc | numeric-asc | numeric-desc | reverse. Default: alpha-asc. |
| caseInsensitive | boolean | No | Sort case-insensitively. Default: false. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/sort-lines \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"banana\napple\ncherry"}'
Response
{
"ok": true,
"data": {
"result": "apple\nbanana\ncherry"
}
}
POST/v1/text/find-replace1 credit / call
Find and replace
Find and replace text, optionally using a regular expression, case-insensitive and/or whole-word matching.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to search. |
| find | string | Yes | Text or pattern to find. |
| replace | string | No | Replacement text. Default: . |
| regex | boolean | No | Treat "find" as a regular expression. Default: false. |
| caseInsensitive | boolean | No | Match case-insensitively. Default: false. |
| wholeWord | boolean | No | Match whole words only. Default: false. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/find-replace \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"cat sat","find":"cat","replace":"dog"}'
Response
{
"ok": true,
"data": {
"result": "dog sat",
"count": 1
}
}
POST/v1/text/word-frequency1 credit / call
Word frequency counter
Count how often each word appears in text, sorted most frequent first.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to analyze. |
| caseInsensitive | boolean | No | Count case-insensitively. Default: true. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/word-frequency \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"the cat and the dog"}'
Response
{
"ok": true,
"data": {
"frequencies": [
{
"word": "the",
"count": 2
}
]
}
}
POST/v1/text/clean1 credit / call
Whitespace and line cleanup
Developer-oriented whitespace and line cleanup: line endings, tabs, indentation, blank lines and trimming.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to clean. |
| lineEnding | string | No | lf | crlf. Default: lf. |
| tabs | string | No | none | tabs-to-spaces | spaces-to-tabs. Default: none. |
| tabWidth | number | No | Spaces per tab. Default: 2. |
| removeIndentation | boolean | No | Strip leading whitespace on each line. Default: false. |
| removeTrailingSpaces | boolean | No | Strip trailing whitespace on each line. Default: true. |
| collapseSpaces | boolean | No | Collapse repeated spaces. Default: false. |
| removeBlankLines | boolean | No | Collapse blank lines. Default: false. |
| trim | boolean | No | Trim the whole text. Default: true. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/clean \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":" hi there \n\n"}'
Response
{
"ok": true,
"data": {
"result": "hi there"
}
}
POST/v1/text/dedupe-words1 credit / call
Remove duplicate words
Remove repeated words from text, keeping the first occurrence of each.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to deduplicate. |
| caseInsensitive | boolean | No | Compare words case-insensitively. Default: false. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/dedupe-words \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"the cat and the dog"}'
Response
{
"ok": true,
"data": {
"result": "the cat and dog"
}
}
POST/v1/text/shuffle-lines1 credit / call
Shuffle lines
Randomly reorder the lines of text (Fisher-Yates shuffle).
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to shuffle. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/shuffle-lines \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"a\nb\nc"}'
Response
{
"ok": true,
"data": {
"result": "c\na\nb"
}
}
POST/v1/text/repeat1 credit / call
Repeat text
Repeat text a number of times, joined by a separator.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to repeat. |
| times | number | Yes | How many times to repeat. |
| separator | string | No | Separator between repeats. Default: . |
Request
curl -X POST https://toolsonduty.com/api/v1/text/repeat \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"ab","times":3,"separator":"-"}'
Response
{
"ok": true,
"data": {
"result": "ab-ab-ab"
}
}
POST/v1/text/reverse1 credit / call
Reverse text
Reverse text by characters, word order, or line order.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to reverse. |
| mode | string | No | characters | words | lines. Default: characters. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/reverse \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hello"}'
Response
{
"ok": true,
"data": {
"result": "olleh"
}
}
POST/v1/text/split1 credit / call
Split text
Split text on a delimiter and rejoin the parts, optionally trimmed and with empties removed.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to split. |
| delimiter | string | Yes | Delimiter to split on. |
| trimParts | boolean | No | Trim each part. Default: false. |
| removeEmpty | boolean | No | Remove empty parts. Default: false. |
| joinWith | string | No | String used to rejoin the parts. Default:
. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/split \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"a,b,,c","delimiter":","}'
Response
{
"ok": true,
"data": {
"result": "a\nb\n\nc"
}
}
POST/v1/text/trim-lines1 credit / call
Trim whitespace
Trim whitespace from the whole text and/or each line, and optionally collapse repeated spaces.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to trim. |
| trimLeading | boolean | No | Trim leading whitespace. Default: true. |
| trimTrailing | boolean | No | Trim trailing whitespace. Default: true. |
| trimEachLine | boolean | No | Trim each line individually. Default: true. |
| collapseSpaces | boolean | No | Collapse repeated spaces. Default: false. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/trim-lines \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":" a \n b "}'
Response
{
"ok": true,
"data": {
"result": "a\nb"
}
}
POST/v1/text/join-lines1 credit / call
Join lines
Replace line breaks with a chosen separator, optionally trimming lines and removing blanks first.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to join. |
| joinWith | string | No | Separator to join lines with. Default: . |
| trimLines | boolean | No | Trim each line before joining. Default: true. |
| removeBlank | boolean | No | Drop blank lines. Default: true. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/join-lines \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"a\nb\nc"}'
Response
{
"ok": true,
"data": {
"result": "a b c"
}
}
POST/v1/text/number-lines1 credit / call
Number lines
Prefix each line with an incrementing number.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to number. |
| start | number | No | Starting number. Default: 1. |
| separator | string | No | Separator between number and line. Default: . . |
| padZeros | boolean | No | Zero-pad the numbers. Default: false. |
| skipBlank | boolean | No | Skip numbering blank lines. Default: false. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/number-lines \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"a\nb"}'
Response
{
"ok": true,
"data": {
"result": "1. a\n2. b"
}
}
POST/v1/text/affix1 credit / call
Add prefix / suffix
Add a prefix and/or suffix to each line.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to affix. |
| prefix | string | No | Prefix for each line. Default: . |
| suffix | string | No | Suffix for each line. Default: . |
| skipBlank | boolean | No | Skip blank lines. Default: true. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/affix \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"a\nb","prefix":"> "}'
Response
{
"ok": true,
"data": {
"result": "> a\n> b"
}
}
POST/v1/text/strip-invisible1 credit / call
Strip invisible characters
Remove zero-width, non-breaking-space and control characters from text.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to clean. |
| zeroWidth | boolean | No | Remove zero-width characters. Default: true. |
| nbspToSpace | boolean | No | Convert non-breaking spaces to regular spaces. Default: true. |
| removeControl | boolean | No | Remove control characters. Default: true. |
| collapseSpaces | boolean | No | Collapse repeated spaces. Default: false. |
| trimLines | boolean | No | Trim each line. Default: false. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/strip-invisible \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"ab"}'
Response
{
"ok": true,
"data": {
"result": "ab"
}
}
POST/v1/text/remove-punctuation1 credit / call
Remove punctuation
Strip punctuation from text, optionally keeping periods and apostrophes.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to clean. |
| keepPeriods | boolean | No | Keep periods. Default: false. |
| keepApostrophes | boolean | No | Keep apostrophes. Default: false. |
| collapseSpaces | boolean | No | Collapse repeated spaces. Default: true. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/remove-punctuation \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"Hi, world!"}'
Response
{
"ok": true,
"data": {
"result": "Hi world"
}
}
POST/v1/text/caesar-cipher1 credit / call
Caesar / ROT cipher
Shift letters by a Caesar cipher amount (13 = ROT13).
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to shift. |
| shift | number | No | Shift amount (0-25). Default: 13. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/caesar-cipher \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hello","shift":13}'
Response
{
"ok": true,
"data": {
"result": "uryyb"
}
}
POST/v1/text/to-binary1 credit / call
Text <-> binary
Encode text as space-separated 8-bit binary of its UTF-8 bytes, or decode it back.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | mode=encode: plain text. mode=decode: binary string. |
| mode | string | No | encode | decode. Default: encode. |
| separator | string | No | Separator between bytes when encoding. Default: . |
Request
curl -X POST https://toolsonduty.com/api/v1/text/to-binary \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hi"}'
Response
{
"ok": true,
"data": {
"result": "01101000 01101001"
}
}
POST/v1/text/to-ascii1 credit / call
Text <-> ASCII/Unicode codes
Convert text to decimal character codes, or decode decimal codes back to text.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | mode=encode: plain text. mode=decode: decimal codes. |
| mode | string | No | encode | decode. Default: encode. |
| separator | string | No | Separator between codes when encoding. Default: . |
Request
curl -X POST https://toolsonduty.com/api/v1/text/to-ascii \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hi"}'
Response
{
"ok": true,
"data": {
"result": "104 105"
}
}
POST/v1/text/morse1 credit / call
Text <-> Morse code
Convert text to Morse code (/ between words), or decode Morse code back to text.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | mode=encode: plain text. mode=decode: Morse code. |
| mode | string | No | encode | decode. Default: encode. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/morse \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"SOS"}'
Response
{
"ok": true,
"data": {
"result": "... --- ..."
}
}
POST/v1/text/nato1 credit / call
NATO phonetic alphabet
Spell text using the NATO phonetic alphabet (/ between words).
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to spell. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/nato \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"SOS"}'
Response
{
"ok": true,
"data": {
"result": "Sierra Oscar Sierra"
}
}
POST/v1/text/pig-latin1 credit / call
Pig Latin translator
Translate English text into Pig Latin, preserving capitalization.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to translate. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/pig-latin \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hello world"}'
Response
{
"ok": true,
"data": {
"result": "ellohay orldway"
}
}
POST/v1/text/acronym1 credit / call
Acronym builder
Build an acronym from the first letter of each word in a phrase.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Phrase to acronym-ize. |
| skipSmallWords | boolean | No | Skip small words (a, the, of, and, ...). Default: true. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/acronym \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"As Soon As Possible"}'
Response
{
"ok": true,
"data": {
"result": "ASAP"
}
}
POST/v1/text/alternating-case1 credit / call
Alternating / funky case
Apply alternating, inverse or random letter casing to text.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to transform. |
| mode | string | No | alternating | alternating-upper | inverse | random. Default: alternating. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/alternating-case \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hello"}'
Response
{
"ok": true,
"data": {
"result": "hElLo"
}
}
POST/v1/text/unicode-style1 credit / call
Unicode style text (bold, italic, ...)
Convert ASCII letters and digits to a Unicode math/style variant such as bold, italic, bold-italic, sans, monospace or fullwidth.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to style. |
| style | string | No | bold | italic | bold-italic | sans | sans-bold | monospace | fullwidth. Default: bold. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/unicode-style \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hi","style":"bold"}'
Response
{
"ok": true,
"data": {
"result": "𝐡𝐢"
}
}
POST/v1/text/small-caps1 credit / call
Small caps text
Convert letters to Unicode small capitals.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to convert. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/small-caps \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hello"}'
Response
{
"ok": true,
"data": {
"result": "ʜᴇʟʟᴏ"
}
}
POST/v1/text/cursive1 credit / call
Cursive / script text
Convert letters to Unicode script (cursive) or bold script.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to convert. |
| style | string | No | script | bold-script. Default: script. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/cursive \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hi"}'
Response
{
"ok": true,
"data": {
"result": "𝒽𝒾"
}
}
POST/v1/text/bubble1 credit / call
Bubble / circled text
Convert letters and digits to circled (bubble) characters, outline or filled.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to convert. |
| style | string | No | outline | filled. Default: outline. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/bubble \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hi"}'
Response
{
"ok": true,
"data": {
"result": "ⓗⓘ"
}
}
POST/v1/text/combining-mark1 credit / call
Strikethrough / underline / overline text
Apply a Unicode combining mark (strikethrough, underline, overline or slash) to each character.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to mark. |
| style | string | No | strikethrough | underline | overline | slash. Default: strikethrough. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/combining-mark \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hi"}'
Response
{
"ok": true,
"data": {
"result": "h̶i̶"
}
}
POST/v1/text/upside-down1 credit / call
Upside-down text
Flip text upside down using look-alike Unicode characters.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to flip. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/upside-down \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hello"}'
Response
{
"ok": true,
"data": {
"result": "ollǝɥ"
}
}
POST/v1/text/zalgo1 credit / call
Zalgo glitch text
Add random combining marks for a glitchy "zalgo" text effect.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to glitch. |
| intensity | number | No | Marks per character (1-20). Default: 8. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/zalgo \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hi"}'
Response
{
"ok": true,
"data": {
"result": "h̶i̶"
}
}
POST/v1/text/transliterate1 credit / call
Transliteration
Convert romanized (Latin-script) input into a target script. Supports 30 schemes: hindi, marathi, nepali, sanskrit, telugu, kannada, tamil, malayalam, odia, bengali, gujarati, punjabi, russian, ukrainian, greek, arabic, persian, urdu, hebrew, georgian, armenian, serbian, bulgarian, macedonian, belarusian, mongolian, kazakh, kyrgyz, tajik, hiragana, katakana, sinhala, korean.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Romanized text to convert. |
| scheme | string | Yes | Scheme id, one of: hindi, marathi, nepali, sanskrit, telugu, kannada, tamil, malayalam, odia, bengali, gujarati, punjabi, russian, ukrainian, greek, arabic, persian, urdu, hebrew, georgian, armenian, serbian, bulgarian, macedonian, belarusian, mongolian, kazakh, kyrgyz, tajik, hiragana, katakana, sinhala, korean. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/transliterate \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"namaste","scheme":"hindi"}'
Response
{
"ok": true,
"data": {
"result": "नमस्ते"
}
}
POST/v1/text/diff1 credit / call
Text diff
Compare two texts and return aligned rows, a unified diff and change blocks, with added/removed counts.
| Parameter | Type | Required | Description |
|---|
| original | string | Yes | Original text. |
| changed | string | Yes | Changed text. |
| precision | string | No | smart | word | char. Default: smart. |
| ignoreWhitespace | boolean | No | Ignore whitespace differences. Default: false. |
| ignoreCase | boolean | No | Ignore letter case. Default: false. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/diff \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"original":"hello world","changed":"hello there"}'
Response
{
"ok": true,
"data": {
"additions": 1,
"removals": 1,
"identical": false
}
}
POST/v1/text/leet-speak1 credit / call
Leet speak converter
Encode common letters as leetspeak digits or decode supported substitutions.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to convert. |
| mode | string | No | encode | decode. Default: encode. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/leet-speak \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"test","mode":"encode"}'
Response
{
"ok": true,
"data": {
"result": "7357"
}
}
POST/v1/text/emoji-decorate1 credit / call
Emoji decorator
Append matching emoji to supported topic and sentiment words.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to decorate. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/emoji-decorate \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"happy success party"}'
Response
{
"ok": true,
"data": {
"result": "happy 😊 success 🏆 party 🎉",
"matches": 3
}
}
POST/v1/text/profanity-filter1 credit / call
Profanity filter
Mask exact words from a transparent built-in English profanity list.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to filter. |
| replacement | string | No | Single masking character. Default: *. |
Request
curl -X POST https://toolsonduty.com/api/v1/text/profanity-filter \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"Example text","replacement":"*"}'
Response
{
"ok": true,
"data": {
"result": "Example text",
"matches": 0
}
}