Normalizing Text Before Checking If It's a Palindrome or Anagram
August 28, 2026 · DevTools
Checking whether a phrase is a palindrome sounds like a one-line reverse-and-compare, until real text shows up with spaces, punctuation, accents, and — for Turkish specifically — a dotted/dotless "i" distinction that plain lowercasing gets wrong. The Anagram Solver & Palindrome Checker runs a real normalization pass before either check, rather than assuming input is already clean lowercase letters.
What normalization actually does
Input first goes through Unicode NFD decomposition and a strip of combining diacritical marks — turning an accented character like "é" into its base letter "e" — before locale-aware lowercasing. That lowercasing specifically uses Turkish locale rules, because in Turkish, uppercase "I" lowercases to a dotless "ı", not the ASCII "i" a default lowercase would produce; the tool then folds that dotless "ı" to regular "i" so English and Turkish input compare consistently, while still preserving Turkish letters that are genuinely distinct (ç, ğ, ö, ş, ü) rather than folding them away too. Everything left after that isn't a letter or digit — spaces, punctuation — gets stripped entirely.
Palindrome checking, after normalization
Once text is normalized, the palindrome check is exactly as simple as it should be: compare the normalized string to its own reversal. "A man, a plan, a canal, Panama" only reads as a palindrome after normalization strips the spaces, comma, and capitalization differences — checking the raw string would (correctly) fail.
Two anagram modes: exact and subset
By default, an anagram search requires an exact letter-for-letter match — a candidate word must use precisely the same multiset of letters as the input, no more, no fewer, which is the traditional definition of an anagram. A separate "subset" mode relaxes that to a word-building check instead: a candidate qualifies if every letter it uses is available in the input's letter pool in sufficient quantity, even if the input has letters left over — useful for the "what words can I spell from these letters" style of puzzle rather than strict full-length anagramming.
Related to wordplay and text handling
For turning anagram or palindrome discovery into a repeatable practice habit, the Flashcards & Spaced Repetition tool handles the scheduling side; for cleaning up messy pasted text before running it through any text-analysis tool, the Text Cleaner tool covers the broader whitespace-and-formatting normalization case.