Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Code Converter

xiaosong8584xiaosong858413 downloads

Detects non-UTF-8 encodings in your vault and safely converts them to UTF-8 with automatic backup. Repairs double-encoded mojibake, exports conversion logs, and supports 10 UI languages.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

An Obsidian plugin that detects non-UTF-8 files in your vault and converts them to UTF-8 with safety protection, plus an experimental mojibake repair command for double-encoded text already baked into valid UTF-8 content.

Chinese version: README.zh-CN.md

Obsidian reads every note as UTF-8. Once a vault contains legacy-encoded files (GBK, Big5, Shift-JIS, UTF-16, ...), they open as garbage. This plugin provides the full detect → backup → convert → strip BOM loop with multiple safety valves so a false positive can never corrupt your notes irreversibly.


Features

  • Strict UTF-8 validation — valid UTF-8 files, including pure ASCII, are left untouched. Zero risk.
  • BOM detection — UTF-8, UTF-16 LE/BE, and UTF-32 byte order marks are trusted directly.
  • Scored encoding detection — decodes are scored across 22 candidate encodings covering 10 script families.
  • Confidence protection — anything below the threshold (80% by default) is never converted silently; you confirm each file.
  • Automatic backup before conversion — roll back at any time.
  • Mojibake repair (experimental) — fixes double-encoded text such as ÖÐÎÄ or 涓枃 using a triple quality gate, line-by-line repair, and a before/after preview.
  • U+FFFD damage detection — counts replacement characters and tells you plainly that the bytes are gone and cannot be recovered automatically. It never invents content.
  • 10 UI languages with RTL — Simplified Chinese, English, Japanese, Korean, Russian, French, German, Spanish, Portuguese, Arabic. The first 4 are free; the last 6 require VIP.
  • Conversion log export — JSON or Markdown.
  • VIP (optional) — offline Ed25519 activation codes (universal or device-bound) unlock folder batch conversion, the last 6 interface languages, and editing the file extension whitelist; they also hide the supporter banner.
  • Privacy — no network requests and no telemetry at all.

Install

  1. Open Settings → Community plugins → Browse and install Code Converter.
  2. Enable the plugin.

Alternatively, download the main.js, manifest.json, and versions.json attachments from a GitHub release, or build from source:

git clone https://github.com/xiaosong8584/code-converter.git
cd code-converter
npm install
npm run build      # produces main.js

Then copy the folder (or symlink it) into your-vault/.obsidian/plugins/code-converter/ and enable it. Full instructions and troubleshooting: User guide (currently Chinese only).


Commands

Open the command palette (Ctrl/Cmd + P) and pick one of:

Command What it does
Convert current file to UTF-8 Converts high-confidence files directly; asks for confirmation below the threshold
Scan and convert current folder (non-UTF-8 → UTF-8) (VIP) VIP feature — converts every non-UTF-8 file in the current folder whose extension is in the whitelist (default md;h;hpp;cpp;c;cc;py;txt)
Detect encoding of current file (report only) Reports encoding, BOM, confidence, and a preview without touching the file
Repair mojibake in current file (double-encoded repair, experimental) Shows a before/after preview of the repair before writing anything
Export conversion log (JSON) / (Markdown) Exports the conversion record in either format

Key settings under Settings → Code Converter: auto-convert on import (on by default, permanently free — this is the plugin's core safety net against Obsidian silently saving a GBK file back as UTF-8 mojibake), file extension whitelist (default md;h;hpp;cpp;c;cc;py;txt, editing requires VIP), confidence threshold, auto backup and backup directory, strip UTF-8 BOM, write UTF-8 BOM, log file, damage warning threshold, interface language (last 6 are VIP), and VIP status.


VIP

The core features are free forever: single-file conversion, encoding detection, mojibake repair, conversion log export, backups and rollback, and the first 4 interface languages.

Three features require a VIP activation code:

  1. Scan and convert current folder (batch conversion) — marked (VIP) in the command palette; without VIP it only prompts and opens the activation dialog.
  2. The last 6 interface languages (Russian, French, German, Spanish, Portuguese, Arabic) — marked (VIP) and disabled in the settings dropdown.
  3. Editing the file extension whitelist — folder batch conversion is a VIP feature, so without VIP the field is disabled and always holds the default list. Note: auto-convert on import is not a VIP feature (see above) and works with the default whitelist for everyone. VIP codes are offline Ed25519-signed codes. They are obtained by supporting the author through GitHub Sponsors or 爱发电 (afdian.net) — pricing is shown on those pages. There is no account, no subscription and no online check; the activation state is stored locally in data.json.

Documentation

  • Users: USER_GUIDE.md — installation, commands, settings, real-world cases, capability boundaries, rollback, and VIP.
  • Developers and maintainers: development documentation lives in the docs directory (architecture, encoding pool, i18n/RTL, logging, the repair algorithm, building and versioning), along with the changelog and the contribution guide.

Disclosure

  • No network use. No telemetry. No data collection. The plugin runs fully offline.
  • Static supporter banner inside the plugin's own interface. Without an active VIP, the plugin may show a static banner supporting the author once per day after startup. It can be dismissed and will not reappear that day. It never loads remote content.
  • Payment required for some features. Folder batch conversion, the last 6 interface languages, and editing the file extension whitelist require a VIP activation code (see VIP). Single-file conversion, encoding detection, mojibake repair, log export, and backups are free forever. No account or subscription is involved.
  • No file access outside the vault.

License

MIT (see LICENSE)

HealthExcellent
ReviewSatisfactory
About
Detect non‑UTF‑8 files and convert them to UTF‑8 with strict validation, BOM handling, scored encoding detection, confidence gates, and automatic backups to avoid irreversible changes. Repair double‑encoded mojibake with line‑by‑line preview, flag U+FFFD damage, export conversion logs, and run fully offline with no telemetry.
FilesFormatsBackup
Details
Current version
1.7.1
Last updated
4 days ago
Created
3 weeks ago
Updates
2 releases
Downloads
13
Compatible with
Obsidian 1.4.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
GitHub Sponsors
Support
Author
xiaosong8584xiaosong8584
GitHubxiaosong8584
  1. Community
  2. Plugins
  3. Files
  4. Code Converter

Related plugins

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Importer

Convert your data to Markdown files you can use in Obsidian. Works with Apple Notes, OneNote, Evernote, Notion, Google Keep, and many other formats.

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Advanced URI

Control everything with URI.

Thino

Quickly capture memos and display them in the sidebar with a heatmap. (Closed source)

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

ChatGPT MD

A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into your notes.

Quick Explorer

Perform file explorer operations (and see your current file path) from the title bar, using the mouse or keyboard.

QuickAdd

Quickly add new notes or content to your vault.

Git

Integrate Git version control with automatic backup and other advanced features.