V2Ray Subscription Formats Explained: Base64, Native JSON, and Share-Link Conversion

A Base64 subscription, native JSON config, and VMess or VLESS share link are different data formats. Identify the outer container and node protocol first, then decode, split, or import to avoid format errors and lost fields.

At a glance

This guide is for users importing, migrating, or troubleshooting V2Ray subscriptions. It explains the boundaries between Base64 text, native JSON, and share links, then walks through format detection and client import while highlighting commonly lost transport, TLS, routing, and update data.

Separate subscriptions, share links, and runtime configs first

A “subscription” usually means a URL that can be requested periodically. After the client accesses it, the server returns a set of nodes and the client stores them locally. The subscription URL itself is not a node; it is an ever-changing data source. The same URL might return 8 nodes today and 10 after the next update.

A “share link” represents a single node. Common links begin with vmess:// or vless:// and carry the server address, port, user ID, transport, and TLS parameters. Multiple share links can be placed one per line and encoded as a subscription response, but an individual link cannot update itself.

“Native JSON” usually means a runtime configuration readable by the V2Ray or Xray core. It contains objects such as inbounds, outbounds, routing, and dns, describing not only remote nodes but also local listening ports, traffic entry points, and routing behavior. Importing a complete runtime config as a regular subscription may not let the client extract a node list.

Subscription response

Data count
Usually multiple nodes
Common outer format
Base64 text
Update method
Request the subscription URL again
Primary use
Bulk node management

The focus is the node set and its future updates, not the client’s complete settings.

Single-node link

Data count
One node per link
Common prefixes
vmess or vless
Update method
Import the links again
Primary use
Sharing and quick migration

Best for moving a small number of nodes; it cannot preserve the subscription group’s remote update relationship.

Native JSON

Top-level object
inbounds and outbounds
Local ports
May include 10808 and 10809
Routing rules
Can be expressed in full
Primary use
Core runtime configuration

Before importing, confirm that the client can run the entire configuration rather than only parse its nodes.

Client-local data

Node records
Added from a subscription or manually
Group information
Maintained by the client
System proxy
A local-device setting
Routing mode
May be independent of the subscription

Migrating nodes does not migrate local ports, routing mode, or system proxy status.

Conclusion: identify the data layer before converting

Keep the subscription URL when regular updates matter; use share links for individual nodes; use a complete JSON config only when you need to copy local inbounds, DNS, and routing behavior.

How to identify and decode a Base64 subscription

Traditional V2Ray subscription responses often join multiple share links with newlines and then Base64-encode the complete UTF-8 text. When opened directly in a browser, the subscription URL may show a long string made up of letters, numbers, plus signs, slashes, and equals signs. Only after decoding the outer layer do line-by-line vmess:// or vless:// links appear.

Do not judge solely by whether a string “looks like Base64.” Plain text, compressed data, and some URL-safe encodings can look similar. A reliable approach is to inspect the response content type and first few characters, then try decoding. The result should be valid UTF-8 text, with a recognizable protocol prefix on every non-empty line. If decoding still produces encoded text, check for double encoding instead of decoding repeatedly without verification.

Fetch response Identify container Decode text Parse line by line Save to group

Typical structure after outer decoding

vmess://encoded single-node data
vless://[email protected]:443?encryption=none&security=tls&type=ws&path=%2Fedge#A-WS
vless://[email protected]:443?encryption=none&security=reality&type=tcp&flow=xtls-rprx-vision#B-TCP

The examples above show the structure only and do not provide usable credentials. In practice, split the response on newline characters and support both Unix LF and Windows CRLF. Empty lines can be ignored, but trim leading and trailing spaces first. If the server response does not end with a newline, the final link must still be parsed.

Base64 has standard and URL-safe alphabets. The standard form uses plus and slash, while the URL-safe form uses hyphens and underscores; trailing equals padding may also be omitted. Mature clients usually handle these differences, but manual processing should normalize the alphabet and restore padding first. If the encoded length leaves a remainder of 2 when divided by 4, add two equals signs; if the remainder is 3, add one; a remainder of 1 usually means the text is truncated.

VMess and VLESS share-link fields

VMess and VLESS share links use different encoding methods. A common VMess link places a Base64-encoded JSON object after vmess://. The object may contain fields such as add, port, id, net, path, host, tls, and sni. Some older formats also include v, ps, and aid; the commonly used config version is 2, while aid is usually 0 in modern deployments.

A VLESS share link is closer to a standard URI: the user ID occupies the username area, the server address and port occupy the host area, transport and security parameters go in the query string, and the node remark appears in the fragment after the hash. For example, type=ws means WebSocket, security=tls means TLS, and path=%2Fedge decodes to /edge. Parameter order usually does not affect meaning, but names and values must be URL-encoded correctly.

Field purpose Common VMess fields Common VLESS location Conversion notes
Server add URI host portion Keep square brackets around IPv6 addresses
Port port URI port portion Must be an integer from 1 to 65535
User ID id URI user-info portion Do not add spaces when copying
Transport type net type ws, tcp, and grpc cannot be mixed arbitrarily
Transport path path path or serviceName WebSocket paths and gRPC service names have different meanings
Security layer tls security TLS and Reality require different parameters
Server name sni sni Do not substitute the node remark for the server name

Conversion is not just a prefix change

VMess and VLESS are different protocols, so you cannot simply change vmess:// to vless://. Even when the server address, port, and transport layer match, the server must provide an inbound for the target protocol and the user authentication method must match. More precisely, “conversion” maps shared connection parameters to another link structure when the server is known to support the target protocol.

Transport fields must be mapped by meaning. For example, net=ws in VMess JSON can map to type=ws in VLESS, and path=/edge must become a URL-encoded query parameter. However, the public key, short ID, fingerprint, and Flow required by Reality do not exist in a traditional VMess + TLS link, so a converter cannot invent them.

Conclusion: map existing parameters only

If the target link lacks a public key, short ID, SNI, or gRPC service name, obtain the complete parameters from the node provider. Filling gaps with defaults usually produces a link that is syntactically valid but cannot connect.

How to organize native JSON and share links

When extracting a share link from native JSON, first locate an outbound in outbounds whose protocol is VMess or VLESS, then read its server, port, and user fields. Next inspect streamSettings: network determines the transport type, security determines TLS or Reality, and the specific WebSocket, gRPC, or TCP settings are stored in the corresponding child object.

When generating JSON in the opposite direction, a share link can restore only the remote outbound and its transport parameters. It usually cannot provide a local SOCKS port, HTTP port, DNS servers, log level, or complete routing rules. After converting a share link to JSON, the client or config generator must supply the local section. A common local setup uses a SOCKS listener at 127.0.0.1:10808 and an HTTP listener at 127.0.0.1:10809; use the ports configured by the current client.

{
  "log": {
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 10808,
      "protocol": "socks"
    }
  ],
  "outbounds": [
    {
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "node.example",
            "port": 443,
            "users": [
              {
                "id": "example value hidden",
                "encryption": "none"
              }
            ]
          }
        ]
      }
    }
  ]
}

This JSON snippet illustrates the hierarchy only. A real configuration also needs streamSettings matching the node and may require additional direct and block outbounds. If you import a config without transport settings while the server actually uses WebSocket + TLS, the core will attempt a mismatched default transport; logs usually show a closed connection or handshake failure.

Exporting a single-node link from a complete config also exposes information that cannot be represented. Domain routing, GeoIP, GeoSite, process rules, and DNS query policies belong to the runtime configuration, not to a single-node URI. The correct approach is to migrate nodes and routing separately: import nodes through share links, then restore routing through the client’s backup or import function, or configure it manually.

  1. Check that the JSON top level contains outbounds, then confirm the target outbound’s protocol name.
  2. Read the server address, port, and user parameters; do not copy examples or expired records.
  3. Extract the transport, security layer, SNI, path, and service name from streamSettings.
  4. Generate a share link for the target protocol and URL-encode the path, remark, and query parameters.
  5. After importing into the client, open the details page and verify the port, transport, TLS, SNI, and user ID field by field.
  6. Test one node first, then add nodes in bulk to the subscription response so incorrect parameters do not spread across the entire group.

Import coverage and steps for three clients

v2rayN is a desktop client that manages subscription groups, single-node links, and custom configurations. Using the 7.x interface as an example, add a subscription URL via “Subscription groups” → “Subscription group settings,” create a group, enter and save the URL, then choose “Subscription groups” → “Update all subscriptions.” If the clipboard contains multiple share links, use “Servers” → “Import bulk URLs from clipboard.”

v2rayNG uses the Xray core to handle common VMess and VLESS nodes. On Android, open the top-left menu to reach “Subscription group settings,” use the add button in the top-right to save the URL, then return to the main screen and update. For one or more share links, copy them to the clipboard and use the top-right “+” to select “Import from clipboard.” Wording may vary slightly across minor versions, but the entry points remain centered on subscription groups and the add button.

v2flyNG uses the v2fly core and is suited to setups centered on VMess and V2Ray-compatible configurations. Its subscription and clipboard import flow resembles common Android layouts, but supported protocols depend on the core. If a subscription includes a security method or transport combination implemented only by another core, the links may parse and appear while still failing at runtime.

Client Primary platform Base64 multi-node subscription Share links Complete JSON
v2rayN 7.x Desktop Can update by subscription group Supports bulk clipboard import Can be used as a custom config; verify the core
v2rayNG 1.10.x Android Can save the URL and update Supports clipboard and file import Import capability depends on the config structure and Xray core
v2flyNG 1.x Android Can manage subscription groups Suitable for V2Ray-compatible links Must fall within the v2fly core’s supported range

Six parameters to verify after import

How to troubleshoot failed conversions, empty subscriptions, and garbled text

Conversion failures usually occur at one of three stages: fetching the subscription response, decoding the outer container, or parsing individual nodes. Troubleshoot in that order instead of changing protocol parameters first. If the subscription request returned an error page, later Base64 decoding and node import cannot produce a valid result.

Start by recording three concrete values: HTTP status, response size in bytes, and the number of non-empty lines after decoding. For example, a successful status, an 18 KB response, and 24 decoded lines indicate that fetching and outer decoding are essentially complete. If the client shows only 20 nodes, inspect the protocol prefixes or field formats of the remaining 4 lines.

What if an update shows zero nodes?

Do not delete the original group yet. Copy the subscription URL into a controlled environment and inspect the response type; if it starts with HTML tags, the request was likely redirected to an interstitial page. After confirming that the URL is complete, save it again in the client and update.

What if Base64 decoding reports an invalid length?

Remove newlines and leading or trailing spaces, then confirm whether the standard or URL-safe alphabet is being used. Add two equals signs when the length leaves a remainder of 2 after division by 4, or one when the remainder is 3; with a remainder of 1, fetch the original text again.

What if import succeeds but all node names are garbled?

Confirm that both the subscription response and decoded result are read as UTF-8. If only the remark after the hash is garbled, percent-decode the URI fragment again; do not decode the entire link twice.

Why is the path missing after importing a VLESS link?

Check whether the original link contains type=ws and path=. Slashes in the path should be encoded as %2F; for gRPC, verify serviceName instead of entering a WebSocket path.

Why does the same link behave differently across clients?

Compare the client core family and version first, then open the node details to check unsupported parameters. Successful link parsing means only that the structure is readable; it does not mean the current core implements the specified transport and security combination.

Use logs to locate field-level errors

If the node starts but cannot establish a connection, check the client core log first. DNS resolution failures usually point to the domain or DNS settings; connection timeouts are more likely related to the address, port, or network path; TLS handshake failures call for checking the SNI, system time, and security layer. A configuration-field error during startup requires checking the JSON hierarchy or whether the current core recognizes the field.

Local port conflicts can also cause a configuration to import correctly but remain unusable. For example, if the SOCKS port is set to 10808 while another instance is already listening on it, the core may fail to start. In v2rayN, open “Settings” → “Parameter settings” to check the port and close duplicate instances; on Android, stop the current connection before starting the target configuration again.

Secure migration and long-term maintenance

A subscription URL may provide access to a node list and should be managed as sensitive configuration. Save it in the client’s subscription group rather than exposing the complete URL in screenshots, public documents, or chat logs. For cross-device migration, prefer the client’s own config export function and delete temporary files afterward.

Do not use online conversion pages to process real subscriptions. Base64 is an encoding, not a confidentiality mechanism; any service that can read the decoded text can obtain its node parameters. For structural checks, make a local copy, remove the user ID and subscription query parameters first, and then analyze the format.

For long-term maintenance, keep the node source separate from local policy. The subscription updates nodes; the client controls the system proxy, TUN, DNS, and routing. This way, changes to the subscription list will not accidentally overwrite local direct-routing domains, block rules, or listening ports.

  1. Create separate subscription groups for different sources instead of merging every node into one untraceable list.
  2. Record the node count before updating, then compare additions, removals, and name changes afterward.
  3. Keep a verified working copy of at least one node so a temporary subscription problem does not disable every configuration.
  4. After each conversion, spot-check at least one VMess and one VLESS node and verify the transport fields.
  5. After upgrading the client, verify subscription updates, node startup, and local ports before restoring the automatic update schedule.

Conclusion: maintain node formats and local policy separately

Subscriptions update node collections, share links migrate individual nodes, and JSON expresses the complete runtime structure. Keeping data at these three levels makes compatibility issues easier to isolate when changing clients or cores.

Client downloads View download options for each platform