# WireGuard/OpenVPN to Clash and sing-box Config Bridge

Convert pasted WireGuard or OpenVPN client text into Mihomo/Clash YAML or sing-box JSON with secret-field diagnostics; do not share private keys

> Canonical page: https://elysiatools.com/en/tools/wireguard-openvpn-to-clash-singbox-bridge

- **Category:** Format Conversion

- **Keywords:** WireGuard, OpenVPN, Mihomo, Clash, sing-box, VPN config, config bridge, routing rules

## Overview

Preserves endpoints, keys, allowed IPs, DNS, inline TLS material and routing rules; reports target-specific fields that cannot be mapped exactly.

## Inputs

- **VPN Config** (textarea): Paste a WireGuard .conf or OpenVPN .ovpn client config
- **Source Format** (select)
- **Target Format** (select)
- **Routing Policy JSON** (textarea): \[{"kind":"domain-suffix","value":"example.com","outbound":"VPN"}\]
- **Profile Name** (text): VPN

## When to use

- You need to convert a WireGuard client profile into Mihomo or Clash YAML.
- You want to turn an OpenVPN client configuration with inline TLS material into sing-box JSON.
- You need to add domain-based routing rules while checking target-specific compatibility.

## How it works

- Paste a WireGuard .conf or OpenVPN .ovpn client configuration into the VPN Config field.
- Choose Auto detection or specify WireGuard or OpenVPN as the source format.
- Select Mihomo/Clash YAML or sing-box JSON as the target format, then optionally enter a profile name.
- Add routing rules as JSON if needed, and review the generated text and secret-field diagnostics.

## Use cases

- Migrating a WireGuard full-tunnel profile with a DNS override to Mihomo or Clash.
- Converting an OpenVPN profile containing inline CA, certificate, and key blocks into a sing-box endpoint.
- Applying domain-specific routing policies while moving VPN settings between configuration formats.

## Frequently asked questions

### What input formats are supported?

The tool accepts pasted WireGuard client text and OpenVPN client text.

### What output formats can it create?

It creates Mihomo/Clash YAML or sing-box JSON.

### Can it preserve DNS and allowed IPs?

Yes. It preserves supported DNS settings, endpoints, keys, and allowed IPs.

### Can I add routing rules?

Yes. Enter routing rules as JSON, such as domain-suffix rules with an outbound name.

### Should I paste a private key?

Do not share private keys or other sensitive VPN credentials. Review generated output and diagnostics carefully.

## Related tools

- [YAML-JSON Converter](https://elysiatools.com/en/tools/yaml-json-converter): Convert between YAML and JSON formats
- [TOML / INI / HCL / .env / Nix / dotenv ⇄ Kubernetes ConfigMap & Secret Config Format Bridge](https://elysiatools.com/en/tools/toml-ini-hcl-envfile-nix-dotenv-kubernetes-configmap-secret-config-format-bridge): Convert configuration files between dotenv .env, TOML, INI, Java .properties, YAML, JSON, HCL (Terraform/Vagrant native syntax) and Nix attribute sets, and emit Kubernetes ConfigMap or Secret manifests. Template placeholders (${VAR}, {{var}}, envsubst) are preserved verbatim, type inference provenance (string/int/float/bool/list) is tracked, HCL block labels fold into nested keys, and a round-trip diff calls out non-equivalent settings — dropped keys, re-typed values and rewrites — instead of coercing them silently.
- [JSON Schema to Zod Schema Converter](https://elysiatools.com/en/tools/json-schema-to-zod-schema-converter): Convert JSON Schema JSON/YAML definitions into ready-to-use Zod schemas with nested objects, arrays, enums, and common validation rules
- [OpenAPI to TypeScript Generator](https://elysiatools.com/en/tools/openapi-to-typescript-generator): Convert OpenAPI or Swagger JSON/YAML specs into TypeScript API types, request payloads, and response models with configurable output and naming styles
- [HCL-JSON Converter](https://elysiatools.com/en/tools/hcl-json-converter): Convert between HashiCorp Configuration Language (HCL) and JSON formats for Terraform configurations
- [JSONata Query & Transform Studio](https://elysiatools.com/en/tools/jsonata-query-transform-studio): Preview JSONata-style queries and transformations, compare results across sample payloads, and export the transformed output as JSON, CSV, YAML, or Markdown
- [OpenAPI to Postman Collection](https://elysiatools.com/en/tools/openapi-to-postman-collection): Turn an OpenAPI 3.x or Swagger 2.0 spec (JSON/YAML) into an importable Postman Collection v2.1.0 with folders, variables, auth and example responses.
- [TOML-JSON Converter](https://elysiatools.com/en/tools/toml-json-converter): Convert between TOML and JSON formats with support for comments and complex data structures

## Samples

- [Distributed Tracing Samples](https://elysiatools.com/en/samples/distributed-tracing-samples): Comprehensive distributed tracing examples using Jaeger, OpenTelemetry, and other modern observability tools for microservices architecture
- [Parcel Bundler Samples](https://elysiatools.com/en/samples/parcel): Parcel zero-configuration bundler examples including project setup, plugins, and advanced configuration
- [OpenAPI/Swagger Samples](https://elysiatools.com/en/samples/openapi-swagger): Comprehensive API documentation examples using OpenAPI 3.0 and Swagger specifications for RESTful services
- [pnpm Package Manager Samples](https://elysiatools.com/en/samples/pnpm): Fast, disk space efficient package manager examples including monorepo management, workspace configuration, and advanced workflows
