https://github.com/paste-perfect/paste-perfect
Easily highlight and copy your code with HTML formatting for seamless pasting into Word, PowerPoint, or plain text.
https://github.com/paste-perfect/paste-perfect
copy-paste highlighting prismjs syntax syntax-highlighting
Last synced: about 2 months ago
JSON representation
Easily highlight and copy your code with HTML formatting for seamless pasting into Word, PowerPoint, or plain text.
- Host: GitHub
- URL: https://github.com/paste-perfect/paste-perfect
- Owner: paste-perfect
- License: mit
- Created: 2025-03-16T15:25:11.000Z (over 1 year ago)
- Default Branch: dev
- Last Pushed: 2026-04-27T11:22:11.000Z (2 months ago)
- Last Synced: 2026-04-27T13:25:29.204Z (2 months ago)
- Topics: copy-paste, highlighting, prismjs, syntax, syntax-highlighting
- Language: TypeScript
- Homepage: https://paste-perfect.github.io/paste-perfect/
- Size: 25.4 MB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Paste Perfect
> Easily highlight and copy your code with HTML formatting for seamless pasting into Word, PowerPoint, or plain text. Enjoy clean, professional-looking code in just a few clicks!
[](https://github.com/paste-perfect/paste-perfect/actions/workflows/build.yml)
[](https://github.com/paste-perfect/paste-perfect/actions/workflows/deploy.yml)
[](https://github.com/paste-perfect/paste-perfect/stargazers)
[](https://github.com/paste-perfect/paste-perfect/issues)
[](LICENSE)
## Visit Paste Perfect
Check out the [**Paste Perfect Website**](https://paste-perfect.github.io/paste-perfect/) to start with the formatting
Here’s a quick look at Paste Perfect in action:

## Table of Contents
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Usage](#usage)
- [Project Background](#project-background)
- [Contributing, Local Installation & Technical Details](#contributing-local-installation--technical-details)
- [License](#license)
## Features
- **Seamless Copy** – Retain syntax highlighting and indentation when copying to Word or PowerPoint.
- **Persistence** – Settings (language, theme, indentation, etc.) are remembered between sessions.
- **Dynamic Loading** – Only load the Prism.js language definitions you actually need.
- **Support for Different Indentation Modes** – Choose spaces, tabs, or non-breaking spaces (NBSP), depending on your target application.
## Usage
1. **Enter Your Code** → Paste or type your code in the **Source Code** section.
2. **Adjust Settings** → Select:
- **Language** (e.g., TypeScript, Python, C++)
- **Theme** (various color schemes)
- **Indentation Mode**:
- **Spaces/Tabs** → Best for Word
- **NBSP** → Best for PowerPoint
- **Indentation Size**
3. **View the Highlighted Output** → The formatted code appears in the **Result** section.
4. **Copy with Formatting** → Click the green **Copy** button to copy your code with inline styling.
5. **Auto-Save Preferences** → Settings persist, so you don’t need to reconfigure them next time.
## Project Background
I had the experience that most online syntax highlighters lose their formatting or indentation when pasted into Microsoft Word or PowerPoint. Either:
- **No styling** is preserved,
- **Indentation** is completely lost, or
- Other formatting issues occur.
**Paste Perfect** solves this by:
- **Inlining styles** before copying.
- **Replacing leading spaces/tabs with appropriate characters** to ensure indentation stays intact.
- **Allowing customization for different applications** (Word, PowerPoint, etc.).
## Contributing, Local Installation & technical details
See our [Contributing Guidelines](CONTRIBUTING.md). We appreciate your help in making Paste Perfect better!
## Development Environment
The `dev` branch gets automatically pushed and deployed to GitHub Pages in a separate Repo: https://github.com/paste-perfect/paste-perfect-test
## License
This project is licensed under the [MIT License](LICENSE). Feel free to use, modify, and distribute this software as your needs require.