Text Manipulator

Text Manipulator API

Content

Transform text with powerful editing tools. Convert case, format, clean data, find/replace, and process text in bulk with one-click operations.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

100 requests per minute

Endpoints

1 endpoint available

Overview

The Text Manipulator API provides programmatic access to powerful text transformation operations. Use it to convert case, clean data, find and replace text, and perform bulk text operations.

Common Use Cases

  • Batch processing of text data in ETL pipelines
  • Automating text cleanup in content management systems
  • Integrating text transformations into CI/CD workflows
  • Building custom text processing applications

Available Operations

The following operations are supported via the operation parameter:

Case Conversion

  • uppercase - Convert text to UPPERCASE
  • lowercase - Convert text to lowercase
  • title_case - Convert Text To Title Case
  • sentence_case - Convert text to Sentence case
  • alternating_case - Convert to aLtErNaTiNg CaSe

Text Transformations

  • reverse_text - Reverse the entire text
  • reverse_lines - Reverse the order of lines
  • sort_lines - Sort lines alphabetically
  • remove_duplicate_lines - Remove duplicate lines
  • remove_empty_lines - Remove empty lines

Whitespace Operations

  • remove_extra_whitespace - Collapse multiple spaces to single space
  • remove_leading_whitespace - Remove spaces at start of lines
  • remove_trailing_whitespace - Remove spaces at end of lines
  • remove_all_whitespace - Remove all whitespace characters
  • remove_newlines - Remove all newlines (single line output)

Advanced Operations

  • remove_numbers - Remove all numeric characters
  • remove_punctuation - Remove punctuation marks
  • remove_special_characters - Remove special characters
  • escape_html - Escape HTML entities
  • unescape_html - Unescape HTML entities
  • base64_encode - Encode text to Base64
  • base64_decode - Decode Base64 to text
  • find_replace - Find and replace text (requires find and replace parameters)

Endpoints

POST
/v1/tools/text-manipulator
Transform text using the specified operation

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
text
string
Required
The input text to transform
operation
string
Enum: uppercase, lowercase, title_case, sentence_case, alternating_case, reverse_text, reverse_lines, sort_lines, remove_duplicate_lines, remove_empty_lines, remove_extra_whitespace, remove_leading_whitespace, remove_trailing_whitespace, remove_all_whitespace, remove_newlines, remove_numbers, remove_punctuation, remove_special_characters, escape_html, unescape_html, base64_encode, base64_decode, find_replace
Required
The transformation operation to apply
find
string
OptionalText to find (required for find_replace operation)
replace
string
OptionalReplacement text (required for find_replace operation)
caseSensitive
boolean
OptionalWhether find/replace is case sensitiveDefault: false

Response Example

{
  "success": true,
  "result": "HELLO WORLD",
  "operation": "uppercase",
  "inputLength": 11,
  "outputLength": 11
}

Error Codes

400
Invalid request body or missing required parameters
401
Missing or invalid API key
429
Rate limit exceeded
500
Internal server error

Code Examples

curl -X POST https://api.opentools.ca/v1/tools/text-manipulator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "hello world", "operation": "uppercase"}'

Ready to get started?

Create an API key to start using the Text Manipulator API.