SVG Points Attribute Formatter
Format finite x,y coordinate pairs as an SVG points attribute without rounding or path grammar.
Description
Format finite x,y coordinate pairs as an SVG points attribute without rounding or path grammar.
An SVG points attribute can be formatted from x/y pairs without creating any surrounding markup.
When to use this tool
Format finite x,y coordinate pairs as an SVG points attribute without rounding or path grammar.
- Prepare the supplied points fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter points. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.value. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Validate every points row as a finite coordinate pair. Join each pair with a comma and successive points with spaces; an empty list emits empty text.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| points | points. | Numeric rows; at most 128 rows and 128 values per row |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.value | The value value under the stated formula or text convention. |
{
"input": {
"points": [
[
0,
0
],
[
1,
2
]
]
},
"output": {
"result": {
"value": "0,0 1,2"
}
}
} Limitations and assumptions
- No unit conversion, polygon closure or SVG element is added. Numeric spelling uses the runtime's number formatter.
- Point pairs use [x,y], rectangles and viewBox use [x,y,width,height], and all coordinate units must be consistent. This tool does not read, render or modify an SVG document.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- String lists have at most 128 entries of at most 128 code units; matrices have at most 128 rows and columns. Larger numeric lists and parsed JSON have separate bounded budgets. Nonfinite results and excessively large serialized outputs are rejected.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
Use a full SVG parser or rendering engine when the task includes commands and CSS values outside the documented branch. Compare coordinates and transforms under the same units and viewport convention.
References
Similar or alternative tools
- SVG Points Attribute Parser
Parse finite SVG points-attribute number pairs with comma/whitespace or sign separators; reject incomplete pairs and malformed separators.
- SVG Move Line Command Formatter
Format explicit finite M/m/L/l command records for the bounded move/line SVG branch; no other SVG grammar is accepted.