A subscription URL is an access point, Base64 is an encoding, a share link describes a single node, and native JSON can define a complete core configuration. This guide is for anyone troubleshooting a failed subscription, an unimportable JSON file, or a node migration. Start by checking the actual response, then inspect the fields and finish by converting and testing the setup locally.
1. Subscription URLs, Base64, and JSON are different layers
A subscription URL copied into a client is usually an HTTPS URL. The client retrieves the node list or configuration only after accessing it. A .json suffix does not determine the format; the same endpoint may return different content depending on request parameters or the client identifier. Check the actual response when troubleshooting, not just the filename.
A common Base64 subscription is made by placing multiple share links on separate lines and Base64-encoding the resulting UTF-8 text. This does not turn the nodes into a different protocol or provide confidentiality. Anyone who obtains the content can usually recover server addresses and authentication details, so treat the subscription URL as a credential.
Client-compatible link-list subscription
RecommendedThe best choice when managing multiple nodes. The content may be a plain-text list of links or wrapped in Base64; once parsed, the client creates node entries.
Best for: regularly updating nodes or importing them on multiple devices
A single vmess:// or vless:// link
Describes one connection and works well for sharing a node temporarily or troubleshooting its settings. It usually does not include a complete DNS, inbound, or routing setup, and it will not automatically fetch later changes.
Best for: manual imports, checking node fields, or migrating a single node
Native core JSON configuration
Can include inbounds, outbounds, routing, and dns. Make sure the target core and version support the relevant fields; this is not a standard node subscription.
Best for: fixed deployments, custom routing, or preserving a complete runtime configuration
How to identify the format and choose an import method
If decoding produces share links on separate lines, use the node or subscription import option. If it produces an object with inbounds and outbounds, inspect it as a custom configuration first. Do not use the same import option just because both formats contain JSON.
2. vmess://: Base64 wrapper and inner node JSON
A common VMess share link consists of vmess:// followed by a Base64 string that decodes to a node description object. The example below shows the decoded content. The domain and UUID are for illustration only and will not connect to a server. The value "2" for v identifies the share format version, not the core version.
{
"v": "2",
"ps": "Sample VMess WS",
"add": "node.example.net",
"port": "443",
"id": "e7c3a416-5c9e-4f2b-9d81-73d14a9b8620",
"aid": "0",
"scy": "auto",
"net": "ws",
"type": "none",
"host": "node.example.net",
"path": "/gateway",
"tls": "tls",
"sni": "node.example.net"
}
| Field | Meaning | What to check |
|---|---|---|
add / port | Server address and port | The example uses port 443; do not enter the full HTTPS URL as the address. |
id | User UUID | Must match the server. Watch for leading or trailing spaces. |
aid | Legacy alterId parameter | Modern deployments usually use 0. Do not switch to an older value just to troubleshoot. |
scy | VMess payload encryption setting | auto is not the same as outer TLS; they operate at different layers. |
net / path | Transport type and path | This uses WebSocket; /gateway must match the server configuration. |
host / sni | WebSocket Host and TLS server name | They serve different purposes. Do not treat them as interchangeable, even if the example uses the same value for both. |
ps | Display label | Changing the label will not fix authentication failures or handshake errors. |
This JSON is not a configuration that can be passed directly to the core. It lacks a complete outbounds hierarchy, and its field names are shortened for the share-link format. To convert it to a native config, map add to the server address, put the user information in the appropriate protocol user array, and build the transport and TLS settings separately.
3. vless://: UUID, query parameters, and labels
VLESS share links usually use a URI format rather than wrapping an entire JSON object in Base64. The example below demonstrates VLESS over TCP + TLS. It does not use REALITY or configure Vision flow control.
vless://[email protected]:443?encryption=none&security=tls&type=tcp&sni=node.example.net#VLESS%20TLS%20Example
- The UUID comes after
vless://and before@; the server address and port follow@. IPv6 addresses must be enclosed in square brackets in a URI. encryption=nonemeans VLESS does not encrypt the payload at this layer. This example still protects the connection with TLS viasecurity=tls.type=tcpspecifies the transport type, andsnisets the TLS server name. Transport names may appear differently across client and core versions.- The display label follows
#, and%20represents a space. The label is not used for server authentication. - Use
flow=xtls-rprx-visiononly when the server, transport combination, and core all support it. It is not a parameter to add to every VLESS link.
For a REALITY node, check security=reality, pbk, sid, fp, and sni in the link individually. These values cannot be derived from the UUID or server address, nor can they be filled in automatically by converting VMess to VLESS. Use the target client and core version as the authority for the resulting core fields.
Conversion limits: re-encoding does not change the protocol
You can package existing share links into a Base64 subscription or organize known parameters into JSON. But changing the prefix from vmess to vless does not make the server switch to VLESS. A protocol migration requires the server to provide the corresponding inbound and authentication details.
4. Decode and re-encode a Base64 subscription locally
A subscription may contain access tokens and valid UUIDs. When handling real data, use a local text editor or the developer tools in a blank browser page. Do not upload it to an unknown conversion site. The function below only converts the input string; it makes no network requests and does not require you to paste a subscription URL.
function decodeBase64Utf8(input) {
let text = input.trim().replace(/\s+/g, "")
.replace(/-/g, "+").replace(/_/g, "/");
text += "=".repeat((4 - text.length % 4) % 4);
const bytes = Uint8Array.from(atob(text), ch => ch.charCodeAt(0));
return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
}
function encodeBase64Utf8(input) {
const bytes = new TextEncoder().encode(input);
let binary = "";
for (const byte of bytes) binary += String.fromCharCode(byte);
return btoa(binary);
}
const demoLink =
"vless://[email protected]:443" +
"?encryption=none&security=tls&type=tcp&sni=node.example.net#Example";
const subscription = encodeBase64Utf8(demoLink + "\n");
console.log(subscription);
console.log(decodeBase64Utf8(subscription));
This code supports common Base64URL character substitutions and restores missing padding. UTF-8 conversion is needed to handle labels containing non-ASCII characters correctly; calling btoa() directly on such text may throw an error. Read and understand the code before running it, and avoid leaving real credentials in the console history on a shared device.
- After retrieving the subscription response body, check whether it already starts with
vmess://orvless://. If it contains plain-text links, there is no need to decode an outer layer. - If the content is Base64, decode it once and split it by line breaks. Remove blank lines, but do not delete valid characters within a URI or change the case of a case-sensitive path.
- For each
vmess://link, remove the prefix, call the decoding function on that link alone, then useJSON.parse()to inspect the object structure. - To rebuild a list subscription, join the complete share links with line breaks and encode the result. Do not encode the node names shown in the interface.
If the response starts with <!DOCTYPE html>, check whether you are signed in, whether the URL has expired, or whether the endpoint returned an error page. If decoding produces valid JSON, determine whether it is an error message, a node array, or a complete core configuration. Successful Base64 decoding only proves that the content can be recovered; it does not prove that it will connect.
5. Build native Xray JSON from a share link
The VLESS TLS example above is converted below into a minimal runtime configuration to illustrate its structure. It binds a SOCKS inbound to 127.0.0.1:10808 and connects to the example domain on port 443. No service is available at that address, so this config is for inspecting fields only. Before running it, replace the values with parameters provided by your server.
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"tag": "local-socks",
"listen": "127.0.0.1",
"port": 10808,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true
}
}
],
"outbounds": [
{
"tag": "proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "node.example.net",
"port": 443,
"users": [
{
"id": "e7c3a416-5c9e-4f2b-9d81-73d14a9b8620",
"encryption": "none"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "tls",
"tlsSettings": {
"serverName": "node.example.net",
"allowInsecure": false
}
}
}
]
}
This example does not define a separate routing section; requests use the first outbound by default. It also does not include routing rules or system proxy settings. Starting a SOCKS listener does not make every application on the system use it automatically. If 10808 is already in use by a desktop client, stop the duplicate instance or change the port.
Migration options: nodes versus complete configurations
Move nodes: share link or list subscription
- Keep the address, port, UUID, transport, and security parameters.
- Let the client generate local inbounds and runtime configuration.
- Check DNS and routing separately in the target client.
Move a complete deployment: native JSON
- Check the inbounds listener address and for port conflicts.
- Verify outbound tags, routing references, and external file dependencies.
- Validate the configuration with the matching core before testing it.
When exporting a share link from a complete JSON config, DNS, routing, outbound selection, and local listener settings usually cannot be preserved in the link.
“Native JSON” does not mean the format works across all cores. Xray and V2Fly share some configuration structures, but their protocol support and field development are not identical. For example, an Xray config that uses REALITY cannot be made compatible with V2Fly simply by changing the filename. A converter should clearly specify the input format, target core, and which parameters it covers.
6. Import into v2rayN: use separate steps for subscription URLs and clipboard links
The steps below refer to common menus in the Chinese-language interface of v2rayN 7.x; punctuation and menu locations may vary between minor versions. First identify whether you have an HTTPS subscription URL, a single share link, or a complete configuration file, then choose the matching import option. Pasting a webpage URL into the node import dialog often results in a message such as “No valid content.”
- Add a subscription URL: Open “Subscription Group” → “Subscription Group Settings,” create a group, enter a label and the subscription URL provided by your provider, save it, then select the group.
- Fetch the node list: From the “Subscription Group” menu, choose the option to update the current subscription. If a direct connection works, update without using a proxy first. If it times out but an existing proxy is available, try updating through the proxy.
- Import a single link: Copy the complete
vmess://orvless://link and choose “Servers” → “Import bulk URLs from clipboard.” Put multiple links on separate lines and keep each link intact. - Import a complete configuration: Find the custom configuration import option in the Servers menu, select a local JSON file, and choose the required core. Do not expect it to be split automatically into regular nodes that you can edit individually.
- Verify that it runs: Set the node as active and reload. Check the logs for configuration parsing errors, port conflicts, or TLS handshake failures, then make a real web request.
A manually imported node is usually just a snapshot. If the provider later changes the address or UUID, the copied link will not update automatically. Updating a subscription may replace nodes in its group. Keep manual changes in a separate group to avoid mixing them with subscription-managed entries.
7. Subscription parsing and conversion FAQs
Base64 decodes successfully. Why does v2rayN still fail to import it?
First check whether the decoded content is actually a list of share links, one per line. If it is HTML, an error message, or a native config object, use the appropriate import option instead. If it is a list of links, try importing just one first and check its prefix, line breaks, and UUID to narrow down the issue.
Can I re-encode a JSON file as a subscription?
Encoding alone cannot convert the format. If the file is a complete core configuration, first choose an outbound and extract its protocol, server, user, and transport parameters in the share-link format, then generate a link. Simply Base64-encoding the entire file usually will not produce the node list a client expects.
A subscription update timed out. Does that mean the format is wrong?
A timeout is usually a retrieval problem. Check that the subscription URL is complete, the domain resolves, and the current network can reach it. If you already have a working node, try updating through a proxy. Check Base64 and node formats only after a response has been received and a parsing error occurs.
The import succeeded, but webpages will not load. Which parameter should I change?
First check the active node and system proxy settings, then review the logs. For a refused connection, check the address and server port, such as 443. For TLS errors, check the SNI, certificate, and system clock. For authentication failures, verify the UUID. Do not disable certificate verification as a substitute for correct TLS settings.
Will garbled non-ASCII labels affect the connection?
Labels usually do not affect connectivity, but garbled text may indicate that UTF-8 was not handled correctly during conversion. Encode VMess JSON as UTF-8 before Base64-encoding it; encode VLESS labels and query parameters according to URI rules. Do not repeatedly encode the entire link, or colons, question marks, and separators will lose their structural meaning.
After conversion, verify in this order: the content parses, the fields map correctly, the core starts, and requests get through. Keep the original subscription or configuration for reference and make changes only to a copy. For more field details, see the configuration reference; for protocol names and transport terms, see the glossary.