No-Upload Text Anonymizer

This utility takes whatever text you paste in and jumbles it (replaces every alphabet character with a new, random alphabet character). It works in pure JavaScript, on your computer, and doesn't cache or remember or upload anything. You can use this script for things like anonymizing your NaNoWriMo novel, if you're ready to validate but it weirds you out to upload your work onto a server you don't have control over.

How To Use

Paste your text into the first text box, then copy the text from the second text box and put it wherever you need the anonymized text.

Caveats

Right now, this is designed for English text and only does the replacement for pure ASCII characters, i.e., A-Z and a-z, with no accents. Also, the memory usage and speed of your browser are known limitations, since there's no server usage at all: in other words, if what you paste in is long, your browser may hang up for a second or two while it processes, or possibly even crash. ¯\_(ツ)_/¯

I Looked At Your Code. Why You Didn't Do It This Other, Better Way?

The short answer is: I wrote the utility in about 15 minutes on the morning I wanted to validate my NaNoWriMo results. My primary goal was getting something that did the thing without using up a lot of my time. Also, I'm not a JS dev, so I was really winging it on the 'idiomatic JavaScript' front.

That said, if "this other, better way" is a single random generation pass through the alphabet, which I then reused for the whole chunk of text: yes, you're right, that would be faster, but I didn't do it that way because that's a substitution cipher, and an eight-year-old with a sheet of paper can reverse a substitution cipher. On something novel-length—especially in a computer context—that would basically be exactly equivalent to just pasting your raw text over, which is what I didn't want to do.

If you're wondering why I kept the general sentence and word forms, i.e. lowercase letters replaced by other lowercase letters, uppercase letters replaced by uppercase letters, and punctuation and spaces left untouched, it's because (a) I didn't want to run the risk of accidentally lowering my word count by messing with word boundaries and (b) I know from an earlier string-garbling project that it scrapes against something really primal in your brain to look at a very large unit of text that looks like a ransom note from a penny dreadful, or otherwise doesn't obey the rules you expect for things like capitalization and punctuation. I don't have any idea why this happens; I just know that—for me at least—that's true, and also very annoying. The text that you get back from the anonymizer should look basically okay; the phonetics will be garbage, but hopefully it'll have less of that nails-on-chalkboard effect that you get from looking at a wall of text that is just profoundly wrong.