Clash Subscription Link Formats Explained: Base64, YAML, and Converting Between Client Formats

Clash subscription links are essentially Base64-encoded or YAML node lists, and supported formats vary by client. This guide breaks down the common formats and how to convert between them.

What Is a Subscription Link: A Remote List Fetched on a Schedule

A subscription link is just a regular HTTPS URL. The client sends a GET request to it at fixed intervals, the server returns a chunk of text, and the client parses that text to refresh its local node list. The mechanism is no different from an RSS reader pulling a feed: the URL is just the channel, and the format of what comes back is what actually determines whether it works.

Three basic facts worth getting straight up front:

  • A subscription link is not a protocol. It doesn't dictate how traffic is routed — it's simply a pickup address for a node list that refreshes on a schedule.
  • The token in the link is your account credential. A typical subscription URL looks like https://example.com/api/v1/client/subscribe?token=xxxxxxxx, and that string is your identity — anyone who gets hold of it can burn through your plan's data. If you suspect a leak, the first move is to reset the subscription link in your provider's dashboard.
  • The same URL can return different formats. The server inspects the User-Agent header or a URL parameter to identify the client type, then returns either a Base64 list or Clash YAML accordingly — this is how "one link works with multiple clients" is typically implemented.

Base64 Subscriptions: A List of Node Share Links, One per Line

Base64 subscriptions are the general-purpose interchange format that grew out of the V2Ray ecosystem. The server returns one long Base64-encoded block; decode it and each line is a node share link, like this:

ss://[email protected]:8388#HK-01
vmess://eyJ2IjoiMiIsInBzIjoiSEstMDIifQ==
trojan://p%[email protected]:443?sni=cdn.example.com#HK-03

Each line carries its own full set of connection parameters: protocol prefix, address, port, credentials, transport and TLS settings, plus a display name after the # sign. Common prefixes and what they mean:

  • ss:// — Shadowsocks, following the SIP002 spec; everything before the @ is a Base64-encoded method:password.
  • vmess:// — VMess; the whole string is a Base64-encoded JSON object.
  • vless:// — VLESS; parameters are passed as a query string.
  • trojan:// — Trojan; the password sits in the userinfo segment.
  • hysteria2:// (or hy2://), tuic:// — QUIC-based protocols supported only by newer cores like mihomo.

This format is universal across clients and each node is self-contained, so a single link can be shared on its own. The downside: it carries no proxy groups or routing rules, so the client has to fill those in after import. One common gotcha: ssr:// (ShadowsocksR) is not supported by Clash or mihomo — any SSR nodes mixed into a subscription simply get dropped on import, so that's the first thing to check when your node count doesn't add up.

Clash YAML: Nodes, Proxy Groups, and Rules in One File

Clash's native subscription format is a complete YAML config with at least three top-level fields:

mixed-port: 7890
allow-lan: false
mode: rule
proxies:
  - name: "HK-01"
    type: ss
    server: 203.0.113.10
    port: 8388
    cipher: aes-256-gcm
    password: "password"
proxy-groups:
  - name: "Auto Select"
    type: url-test
    proxies: ["HK-01"]
    url: http://www.gstatic.com/generate_204
    interval: 300
rules:
  - GEOIP,CN,DIRECT
  - MATCH,Auto Select
  • proxies: the node list — the fields map one-to-one to a Base64 share link, just written in YAML.
  • proxy-groups: proxy groups, commonly select (manual pick), url-test (auto latency test), load-balance, and fallback.
  • rules: routing rules that send traffic to direct, proxy, or reject based on domain, IP range, GEOIP, and similar matches.

A YAML subscription is a ready-to-go complete config: nodes, groups, and rules all in one shot. The tradeoff is that the format is tied to the Clash ecosystem and other clients can't read it. Core differences also matter here: mihomo (Clash Meta) supports node types like vless, hysteria2, tuic, and wireguard, while the discontinued legacy Clash core will fail to parse — or simply skip — any node type it doesn't recognize.

Subscription Formats Each Client Can Import Directly

The table below lists, by core, which subscription formats the clients featured on this site can import directly:

ClientCoreDirectly Importable Formats
Clash Verge RevmihomoClash YAML, Base64 share link
Clash PlusmihomoClash YAML, Base64 share link
FlClashmihomoClash YAML, Base64 share link
ClashX MetamihomoClash YAML, Base64 share link
Clash for AndroidClash (discontinued)Clash YAML
Clash for WindowsClash Premium (discontinued)Clash YAML
SurfboardSurge-compatibleSurge-format config

The pattern is simple: mihomo-based clients accept both formats — when you import a Base64 subscription, the client parses each share link into a proxies entry locally and layers on a default proxy group and rule set; legacy Clash cores only understand YAML; Surfboard runs on the Surge config system, so a Clash subscription needs converting first. So if your subscription only outputs Base64, picking a mihomo-based client saves you the conversion step entirely.

Three Ways to Convert Between Formats

Method 1: A Subscription Converter (Hosted or Self-Deployed)

A subscription converter acts as a middleman service: you hand it your original subscription URL, it fetches the node list, repackages it in whatever target format you specify, and hands back a new address. The converted URL typically looks like this:

https://sub.example.com/sub?target=clash&url=URL-encoded-original-subscription-address&config=rule-template

The target parameter sets the output format (clash, surge, quanx, etc.), and config points to an add-on rule template. A converter solves two problems at once: format incompatibility, and the missing rules in Base64 subscriptions.

The Credential Risk of Public Conversion Services

Handing your subscription URL to a third-party converter means handing over your token in plain text — that server can see every node and every byte of your usage. For anything sensitive, self-host a converter backend (subconverter is open-source and self-deployable), or switch to a mihomo-based client that imports directly and skip the middleman entirely.

Method 2: Built-In Client Parsing

mihomo-based clients like Clash Verge Rev, Clash Plus, and FlClash let you just paste the Base64 subscription URL when adding a new profile — the core auto-detects the content type and converts it on the fly, no external tools needed. This is by far the least fiddly path, and the one new users should reach for first.

Method 3: Manual Decoding and Rewriting

For troubleshooting, or when you only need a handful of nodes, you can handle it by hand. Decoding a Base64 subscription takes one command:

curl -s "subscription-URL" | base64 -d

Once decoded, go through the node links line by line and check whether each protocol prefix is on your core's supported list. To convert to YAML, just copy the fields into the proxies format from the previous section — for a small number of nodes, doing it by hand is actually faster than standing up a converter.

Troubleshooting Order for Failed Imports

If a subscription import throws an error or comes back empty, work through these checks in order — highest hit rate first:

  1. Open the subscription URL directly in a browser first. Getting text back means the link is valid; a 401/403 means the token has expired, a 404 means the path has changed — either way, grab a fresh link from your provider's dashboard.
  2. Check the format of what's returned. A long unbroken block of ciphertext in the browser is Base64; if you see fields like proxies and rules, it's YAML. If the format doesn't match your client, convert it.
  3. Check whether the node protocols are supported by the core. Any ssr:// entries get dropped by Clash-family cores; entries using hysteria2 or tuic are only recognized by the mihomo core.
  4. Check your local network. If the subscription URL itself is blocked, you need a working proxy before you can even fetch it — try enabling an option like "update subscriptions via system proxy" in the client, or manually import one node to bootstrap access.
  5. Check the YAML syntax. Hand-edited configs commonly break on indentation, full-width colons, or unescaped special characters — the client's logs usually point to the exact line number.

Subscription Link Security and Routine Upkeep

  • Treat your subscription URL like a password. Don't post it in group chats, don't screenshot and share it, and don't paste it into some random online converter.
  • Reset it immediately if it leaks. Provider dashboards usually have a "reset subscription link" button; the old address stops working the moment you reset, so remember to update the address in every client that uses it.
  • You don't need a short update interval. Node lists don't change often, so the default 12 or 24 hours in most clients is plenty; polling too frequently just loads the server, and some providers will rate-limit you for it.
  • Watch formats when multiple clients share one subscription. If you're running a mix of mihomo-based and legacy-core clients, this only works if the server can output Clash YAML — otherwise the legacy-core machine needs its own converted address.

To sum up the decision path: check the returned format first. Base64 goes straight into a mihomo-based client or through a converter; Clash YAML works across the whole Clash client family; Surge-family clients need a separate conversion. Once the format is sorted, what's left is routine rule and proxy-group tuning, which you can follow step by step in this site's configuration guides.

DOWNLINK READY

Download the Clash Client

mihomo-based clients can import both Base64 and YAML subscription formats directly, with full coverage across Windows, macOS, Linux, Android, and iOS.

Download Clash