Categories

Non-Alphanumeric Cleaner

Remove all non-alphanumeric special characters from text with flexible preservation options

Keep .,!?;:()[]{}"'

Keep spaces, tabs, and line breaks

Keep CJK Unified Ideographs (U+4E00 to U+9FFF)

Add any other characters you want to preserve

Key Facts

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

Overview

The Non-Alphanumeric Cleaner is a text processing tool that removes all special characters, leaving only letters and numbers. It provides flexible options to preserve common punctuation, spaces, Chinese characters, or any custom characters you specify, making it ideal for sanitizing and preparing text.

When to Use

  • When sanitizing user input to remove unwanted special characters for data consistency or security.
  • To prepare text for URLs, filenames, or systems that require alphanumeric-only content.
  • When cleaning up text data for analysis or processing by stripping formatting symbols.

How It Works

  • Enter or paste your text into the input field.
  • Select preservation options: keep common punctuation, spaces, Chinese characters, or add custom characters.
  • The tool processes the text and outputs a cleaned version with only the allowed characters.

Use Cases

Cleaning user-submitted form data to prevent encoding issues or security risks.
Generating clean slugs for web pages by removing special characters from titles.
Preparing text for machine learning models that require alphanumeric input only.

Examples

1. Sanitizing User Comments for Database Storage

Web Developer
Background
A website collects user comments that often include emojis and special symbols, which can cause database errors.
Problem
Need to remove special characters while preserving readability for storage.
How to Use
Paste the comment into the text input, enable 'Preserve Spaces and Newlines' to maintain structure, and disable other options.
Example Config
preserveSpaces: true, preservePunctuation: false, preserveChinese: false, customPreserve: ''
Outcome
The comment is cleaned to contain only letters, numbers, and spaces, ensuring safe database storage.

2. Creating URL Slugs from Article Titles

Content Manager
Background
Article titles contain punctuation and symbols that are invalid in URLs.
Problem
Convert titles into alphanumeric slugs for web addresses.
How to Use
Input the title, disable all preservation options to remove everything except letters and numbers.
Example Config
preservePunctuation: false, preserveSpaces: false, preserveChinese: false, customPreserve: ''
Outcome
The title is transformed into a clean alphanumeric string suitable for use in URLs.

Try with Samples

video, text, barcode

Related Hubs

FAQ

What characters are removed by default?

All non-alphanumeric characters are removed, including symbols like @, #, $, %, &, *, leaving only letters and numbers.

Can I preserve specific punctuation marks?

Yes, enable 'Preserve Common Punctuation' to keep .,!?;:()[]{}"'.

Does it support non-English characters?

Yes, you can preserve Chinese characters by enabling the 'Preserve Chinese Characters' option.

How do I keep characters not listed in the options?

Use the 'Custom Characters to Preserve' field to add any additional characters you want to retain.

Is the tool case-sensitive for letters?

No, it treats both uppercase and lowercase letters as alphanumeric and preserves them by default.

API Documentation

Request Endpoint

POST /en/api/tools/non-alphanumeric-cleaner

Request Parameters

Parameter Name Type Required Description
text textarea Yes -
preservePunctuation checkbox No Keep .,!?;:()[]{}"'
preserveSpaces checkbox No Keep spaces, tabs, and line breaks
preserveChinese checkbox No Keep CJK Unified Ideographs (U+4E00 to U+9FFF)
customPreserve text No Add any other characters you want to preserve

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-non-alphanumeric-cleaner": {
      "name": "non-alphanumeric-cleaner",
      "description": "Remove all non-alphanumeric special characters from text with flexible preservation options",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=non-alphanumeric-cleaner",
      "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]