You reached for find-and-replace. Then the string stopped making sense.
You needed every double-quoted span to use single quotes instead. Or the other way around. A quick replace looked easy until an inner quote showed up. Suddenly the escapes do not line up and you are fixing damage by hand.
Quotes Convert flips matching quotes and sorts out the escaping so nested quotes still read as one valid string.
One replace breaks it. This one knows where quotes belong.
What you get
- Quote flips that stay valid. Matching double quotes become single quotes, or the reverse, with escapes adjusted so nested quotes still work.
- Strings or streams. Run the conversion on text in memory, or stream large inputs chunk by chunk without loading the whole file at once.
- A command-line option when you want files or stdin. Install the optional CLI extra and convert files, pipes, or in-place edits as described in the project docs.
- A browser try-out. Paste sample text in the interactive playground and see the result before you add anything to a project.
- A small core with no bundled dependencies. The library itself stays lightweight; type hints are there if your editor uses them.
- Free and open source. MIT licensed on GitHub and PyPI.
Picture your Tuesday
You inherit a log dump full of JSON-like blobs written with single quotes. You need double quotes before the next tool will accept them. You run the conversion once across the text. The outer quotes flip, inner quotes pick up the right escapes, and you spot-check a few lines before you feed the batch downstream. That check still matters: this is quote flipping with escape rules, not a full grammar pass for every file type.
Want to see it before you install?
Paste a sample in the interactive playground. Same idea as the library, no signup.
Ready to try it?
- See it on GitHub for install steps and examples
- Get it on PyPI
- Read the docs, including the CLI guide if you want the command-line tool






