· Getting Started · 8 min read

How to Import a Clash Subscription: URLs, QR Codes, and YAML Configs

Learn three ways to import subscriptions on mobile and desktop, how Clash YAML differs from Base64-encoded node lists, and how to set up automatic subscription updates.

Check the subscription contents before choosing an import method

URLs, QR codes, and local files are three ways to deliver a subscription—not three config formats. A URL may return a complete Clash config or a Base64-encoded list of nodes. A QR code simply stores text in an image; scan it to find out whether it contains a subscription URL or a link for a single node. Before importing, check which client format the provider recommends and what kind of content you received.

What you receivedHow to identify itWhere to import it
Clash or mihomo config URLThe provider specifies the target client, and the link returns a complete YAML config. The URL doesn't have to end in .yaml.Use the URL field in the config list or the remote subscription option.
QR codePreview the scanned content to tell a subscription URL from a webpage or a single-node URI.If it contains a config URL, paste it into the URL field. If it's a node URI, check whether the client supports importing individual nodes.
Local YAML fileCheck that the extension is .yaml or .yml and that the file contains a complete config—not just nodes or rules.Use the file option in the config list or the local import option.
Base64-encoded node listCommonly found at links labeled “universal subscription.” Decoded, the content is usually a list of node share URIs.Ask the provider for a Clash-compatible format. Don't import encoded text as YAML.

Query parameters in a subscription URL may contain access credentials. Keep the full URL when copying it, but redact the entire link and QR code when asking for help. Don't submit subscriptions to untrusted online decoding or conversion services.

Import by URL on Android and desktop

Android: Add a URL under “Profiles”

  1. In the provider's dashboard, choose “Clash” or the format matching your core, such as “Clash Meta / mihomo,” then copy the subscription URL. Don't copy the account page URL from your browser's address bar or paste the link into a proxy group's node search field.
  2. Using Clash for Android 2.5.x as an example, go to “Profiles” → “+” in the top-right corner → “URL.” Enter a recognizable name, paste the full address into the URL field, then tap Save in the top-right corner. Other Android clients may call this option “Subscriptions” or “Remote Config.”
  3. Wait for the download and parsing to finish, then return to the “Profiles” list and select the entry you just imported. Start the service from the home screen. The first time Android VPN mode takes over traffic, the system will ask you to approve the connection. Check that the request comes from the client you just opened before granting access.

Clash for Android 2.5.x is used here only as an example of the menu flow. It may not support the same fields as clients built on the mihomo core. If the provider offers a config with mihomo-specific fields, check which core your client uses—don't rely on “Clash” in the app name alone.

Desktop: Select the config after importing it

Using Clash Verge Rev 2.x as an example, open “Subscriptions” in the sidebar, paste the address into the subscription URL field, and click “Import.” Once the config card appears, select it, then open “Proxies” to check for the proxy groups defined in the config. A successful download only means the config was saved; it doesn't confirm that the config is selected or that desktop traffic is routed through the system proxy or TUN.

If the same URL imports on your phone but fails to parse on desktop, compare the cores and error messages on both devices. Also check whether the provider serves different content to different clients: the response shown in a browser may not match what the client actually receives.

Import from a QR code: Preview it before proceeding

  1. If the QR code is on a computer screen, preview it with your phone's camera or built-in scanner. If it's saved on the same phone, use the system photo app's recognition feature if available. There's no need to upload the image to a QR scanning website.
  2. If the preview shows a provider's https:// subscription URL, copy the full address and import it using the URL steps. If it opens the provider's login page, sign in and copy the client-compatible subscription link from the dashboard.
  3. If the preview starts with vmess://, ss://, or a similar scheme, it's usually a share link for a single node, not a remote config. Use it only if the client explicitly supports importing individual nodes. Otherwise, ask the provider for Clash YAML or a config subscription URL.

Providers often list “subscription QR codes” and “node QR codes” on the same page. If you scan the wrong one, check the label next to the QR code and preview its contents—you don't need to reinstall the client. And if only one node appears after importing, that doesn't mean the full subscription was imported.

Local YAML files: Tell a complete config from a snippet

Download the config from the provider to your phone's Files app or your desktop's Downloads folder. On Android, select it under “Profiles” → “+” → “File.” On desktop, look for a local import option on the “Subscriptions” or “Profiles” page. Open the file in a text editor to confirm it contains a config, not a webpage saved with a .yaml extension. A file named config.yaml.txt may also be hidden by the file picker.

Identify the file by its top-level fields

  • proxies defines nodes, proxy-groups defines proxy groups, and rules defines how traffic is matched and routed. These are common fields in a complete config, but a usable config doesn't necessarily need all three.
  • A file containing only a list of proxies may be a proxy provider file, usually referenced by proxy-providers in the main config. YAML containing only payload is often a rule set, not a complete main config.
  • Base64 is an encoding, not a Clash config format. Decoding it may give you one share link per line, but that still isn't the YAML structure a config needs. Changing the file extension won't create proxy groups or routing rules.

Here's a minimal direct-connection example to help identify the structure. mixed-port: 7890 sets a local mixed proxy port that accepts HTTP and SOCKS connections. This example has no proxy nodes, so it can't be used to test whether any nodes are working.

mixed-port: 7890
allow-lan: false
mode: rule
rules:
  - MATCH,DIRECT

If manual edits trigger a YAML parsing error, check the reported line and the one above it. Align keys at the same level, indent list items with spaces, and avoid tabs. If parsing succeeds but a proxy group can't be found, check that its name and spacing match the definition exactly. Valid syntax and a working config are two separate checks.

Automatic subscription updates: Set an interval and test a manual refresh

A config added by URL is remote, so the client can fetch it again according to its update settings. A complete config imported from a file is a local copy; even if that file was originally downloaded from the same URL, it won't automatically inherit the remote config's update address. Remote proxy providers defined separately in the main config may have their own update intervals—refreshing a provider is not the same as refreshing the entire subscription.

  1. Open the entry's edit menu in the “Profiles” or “Subscriptions” list and look for “Auto Update,” “Update Interval,” or a similar option. If the interval is in minutes, start with 1440 for 24 hours. If it's in hours, enter 24. Follow the provider's required refresh interval.
  2. After saving, click “Update” once. If the interface shows the last update time, make sure it changes, then check whether the proxy groups load. The node count may stay the same if the server hasn't changed the available nodes.
  3. If manual updates work but automatic ones don't, first check whether the client needs to stay open, then check whether your phone restricts background activity. Closing the app, putting the device to sleep, or system limits on background tasks can delay updates. Don't start by setting the interval to every minute.

A remote refresh may overwrite local edits made directly to a subscription file. To keep custom rules, use the client's override feature if available, or save a local copy and maintain it manually. Before switching to a new subscription URL, back up your custom rules and confirm the new entry can be selected and loaded correctly.

Import problems: Troubleshoot requests, parsing, then activation

  1. Request failed: For a timeout, check your connection and whether the subscription domain is reachable. For 401 or 403, check your subscription access, the link's expiration date, and whether you copied all the parameters. For 404, check the provider dashboard to see if the URL has changed.
  2. Request succeeded, but parsing failed: A 200 response only means the server returned content. If that content is a login page, an error message, or a Base64-encoded node list, the client still can't read it as a Clash config. Choose the right format in the provider dashboard; changing the file extension won't fix it.
  3. The proxy groups are empty after the config loads: Make sure this config is active, then check whether it fetches nodes through proxy-providers. If the logs show a provider failed to load, check the provider URL and its format. You don't need to reimport the entire main config.
  4. Proxy groups have nodes, but traffic isn't being proxied: Check the selected option in the group, confirm the client is running, and see whether the rules route your test request to DIRECT. Use the client's connections page or logs to verify the matched rule and policy. A successful latency test doesn't mean every app is using the proxy.
Download Clash