Jeremy Hou25 downloadsInstantly turns messy AI output into clean Obsidian notes on paste. Removes excessive blank lines, fixes code blocks, headers, removes emojis, and more.
Clean AI Paste is an Obsidian plugin designed to automatically clean up and format text pasted from AI chatbots (ChatGPT, Claude, Gemini, etc.) instantly and silently, every time you paste.
When you copy text from an AI web interface, the result in Obsidian is often cluttered with excessive blank lines, malformed code blocks, over-bolded headers, and broken LaTeX math. This plugin intercepts the paste event, converts the clipboard HTML to native Markdown, and applies a fully customizable set of formatting rules before inserting it into your note.
| Feature | Original AI Paste | With Clean AI Paste |
|---|---|---|
| Headers | ### **Introduction** |
### Introduction |
| Blank Lines | Paragraph.Next paragraph. |
Paragraph.Next paragraph. |
| Code Blocks | python```print("hi")``` |
```pythonprint("hi")``` |
| Math (LaTeX) | \( x = y \) |
$ x = y $ |
| Tracking URLs | https://example.com/?utm_source=chatgpt.com |
https://example.com/ |
?utm_source=chatgpt.com) from URLs in pasted text while preserving important query parameters.** or __) from Markdown headers (**## Header** → ## Header).**[Link Text](url)** → [Link Text](url)).# → ##).\(, \), \[, \]) into Obsidian's native $ and $$.--- separators.python above an unlabeled code block) and binds them into the opening backticks (```python).bash floating above ```bash).Notice popup when the plugin fires (off by default).Shift+Ctrl/Cmd+V - Paste with markdown structure preserved but no plugin transforms applied.Simply paste from your AI tool of choice using the standard shortcut:
Ctrl+VCmd+VAll formatting rules fire instantly and automatically. To bypass the plugin entirely and paste unformatted text, use Shift+Ctrl+V or Shift+Cmd+V.
All rules are individually toggleable from Settings → Clean AI Paste. Settings are organized into three sections:
main.js and manifest.json files into a new folder at YourVault/.obsidian/plugins/clean-ai-paste/.