Categories

Zero Width Character Remover

Remove zero-width and invisible characters from text

Remove all whitespace characters (spaces, tabs, newlines)

Remove control characters (ASCII 0-31, 127-159)

Display statistics about removed characters

Key Facts

Category
Text Processing
Input Types
textarea, checkbox
Output Type
text
Sample Coverage
4
API Ready
Yes

Overview

The Zero Width Character Remover is a specialized utility designed to detect and strip invisible Unicode characters, control codes, and hidden formatting from your text to ensure data integrity and clean input.

When to Use

  • When your code or database queries fail due to unexpected hidden characters.
  • When copying text from PDFs or websites that introduces invisible formatting artifacts.
  • When you need to sanitize user input to prevent injection or display issues in your application.

How It Works

  • Paste your text into the input area to automatically scan for zero-width spaces, non-joiners, and other invisible Unicode characters.
  • Toggle optional settings to include the removal of standard control characters or all whitespace if necessary.
  • View the processed output and review the statistics to see exactly which hidden characters were identified and removed.

Use Cases

Cleaning API request payloads that contain invisible characters causing validation errors.
Sanitizing scraped web content to remove hidden formatting that disrupts layout or database storage.
Fixing broken search functionality caused by hidden characters embedded in user-submitted search terms.

Examples

1. Fixing Broken Database Queries

Backend Developer
Background
A user submitted a form that included a zero-width non-joiner, causing a database lookup to fail despite the string appearing correct.
Problem
The hidden character caused a mismatch between the input and the stored database record.
How to Use
Paste the problematic string into the tool and run the default cleanup to strip the invisible character.
Outcome
The cleaned string matches the database record, allowing the query to execute successfully.

2. Sanitizing Scraped Content

Data Analyst
Background
Content copied from a legacy PDF document contained numerous control characters that caused formatting issues in a spreadsheet.
Problem
Control characters were causing line breaks and encoding errors in the CSV output.
How to Use
Paste the text into the tool, ensure 'Remove Control Characters' is checked, and process the text.
Outcome
The text is rendered as clean, plain text without the disruptive control codes, ready for data analysis.

Try with Samples

image, video, text

Related Hubs

FAQ

What are zero-width characters?

They are non-printing Unicode characters used for formatting, such as zero-width spaces or non-joiners, which are invisible to the human eye but can break code logic.

Does this tool remove standard spaces?

Only if you explicitly enable the 'Remove All Spaces' option; otherwise, it preserves standard spacing while removing hidden formatting characters.

Is my data sent to a server?

No, all processing is performed locally in your browser to ensure your text remains private and secure.

What are control characters?

Control characters are non-printable codes (ASCII 0-31 and 127-159) often used to signal hardware or formatting instructions that can cause errors in modern text fields.

Can I see what was removed?

Yes, by enabling the 'Show Statistics' option, the tool provides a summary of the specific hidden characters detected and removed from your input.

API Documentation

Request Endpoint

POST /en/api/tools/zero-width-remover

Request Parameters

Parameter Name Type Required Description
textInput textarea Yes -
removeSpaces checkbox No Remove all whitespace characters (spaces, tabs, newlines)
removeControlChars checkbox No Remove control characters (ASCII 0-31, 127-159)
showStats checkbox No Display statistics about removed characters

Response Format

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-zero-width-remover": {
      "name": "zero-width-remover",
      "description": "Remove zero-width and invisible characters from text",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=zero-width-remover",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]