<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2026"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2026/ffd-2026.xsd"
      xlink:type="simple"/>
    <context id="C_9b7a5dc3-160a-4fdd-b736-047492f98abc">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001515673</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-06-12</startDate>
            <endDate>2026-06-12</endDate>
        </period>
    </context>
    <context id="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001515673</identifier>
        </entity>
        <period>
            <startDate>2026-06-12</startDate>
            <endDate>2026-06-12</endDate>
        </period>
    </context>
    <context id="C_122515a6-9ec8-4f5d-b981-51b50f1ef309">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001515673</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>2</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-06-12</startDate>
            <endDate>2026-06-12</endDate>
        </period>
    </context>
    <unit id="U_pure">
        <measure>pure</measure>
    </unit>
    <unit id="U_shares">
        <measure>shares</measure>
    </unit>
    <unit id="U_USD">
        <measure>iso4217:USD</measure>
    </unit>
    <dei:EntityCentralIndexKey
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      id="F_be17f78d-a490-4ce9-a354-4574082d4d4c">0001515673</dei:EntityCentralIndexKey>
    <ffd:OffsetTableNa
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      id="F_256d525f-84fb-47b2-965e-33706903756f">N/A</ffd:OffsetTableNa>
    <ffd:FeeExhibitTp
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      id="F_f2bc5285-afe1-4f22-bd03-eb44e32b65e8">EX-FILING FEES</ffd:FeeExhibitTp>
    <ffd:SubmissnTp
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      id="F_08bc5d18-9722-4427-a6ae-14a84472c44d">S-8</ffd:SubmissnTp>
    <ffd:FormTp
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      id="F_6ada54f2-3d5c-4ad1-891f-312859a99bb1">S-8</ffd:FormTp>
    <dei:EntityRegistrantName
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      id="F_a3135778-fca8-41e2-9906-83bda7bc0d9d">ULTRAGENYX PHARMACEUTICAL INC.</dei:EntityRegistrantName>
    <ffd:PrevslyPdFlg
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      id="F_87a06907-c81d-4a42-8156-df149894e2c2">false</ffd:PrevslyPdFlg>
    <ffd:PrevslyPdFlg
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      id="F_83672854-a024-4245-82c2-e1743288f1b9">false</ffd:PrevslyPdFlg>
    <ffd:OfferingSctyTp
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      id="F_4d775e61-4b01-4331-b074-1b198d7760df">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      id="F_236f63d5-8653-4750-a531-776a81b4d515">Common stock, $0.001 par value per share</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      id="F_5e38a391-cb2e-4425-8263-dae19bf7ec60">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      decimals="-6"
      id="F_71c9f862-e4b1-4aea-b98d-361f50dd64b9"
      unitRef="U_shares">3000000</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      decimals="2"
      id="F_f11d03b3-fe0a-4ff6-961e-e9b5ab6a5709"
      unitRef="U_USD">21.84</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      decimals="-3"
      id="F_d2aca922-d73b-438a-8468-c97dbe82dbb8"
      unitRef="U_USD">65520000</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      decimals="7"
      id="F_fd9a368d-e015-4a29-abf1-67d44024133c"
      unitRef="U_pure">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      decimals="2"
      id="F_0dc199dd-94a8-41f6-86d6-43f2130501f2"
      unitRef="U_USD">9048.31</ffd:FeeAmt>
    <ffd:OfferingSctyTp
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      id="F_80dd0165-25b5-4f87-84c2-982cc454e2fe">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      id="F_d9916cb4-c3f1-4bbe-a4f1-fa0e9c164331">Common stock, $0.001 par value per share</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      id="F_2178d9c5-4849-44ca-9a41-54bd8a504c32">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      decimals="-3"
      id="F_66c15c55-3463-4312-95ca-0929f2b4b670"
      unitRef="U_shares">400000</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      decimals="2"
      id="F_9dbde42f-602d-43f3-818c-d4cfa8ea2a5f"
      unitRef="U_USD">21.84</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      decimals="-3"
      id="F_4f7fb0cc-c5ce-4c4d-8c35-cdf1a05fdb0c"
      unitRef="U_USD">8736000</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      decimals="7"
      id="F_f74246b1-90b2-44ff-82d0-dfda4f6242e4"
      unitRef="U_pure">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      decimals="2"
      id="F_8b29ff3e-e8e2-49a9-bac7-786bdb67e457"
      unitRef="U_USD">1206.44</ffd:FeeAmt>
    <ffd:TtlOfferingAmt
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      decimals="-3"
      id="F_2c40494a-0ed1-4ed8-baa6-2bbff33964c2"
      unitRef="U_USD">74256000</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      decimals="2"
      id="F_9a79c749-3979-4bd2-a82d-e9b129bdf9cd"
      unitRef="U_USD">10254.75</ffd:TtlFeeAmt>
    <ffd:TtlOffsetAmt
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      decimals="0"
      id="F_e7b86552-5724-4415-8421-d038642f91f8"
      unitRef="U_USD">0</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt
      contextRef="C_b2cf5956-628d-4d8f-a034-c48adaf3c6b1"
      decimals="2"
      id="F_b83428cf-8e47-4e05-9859-a02feb37a6b8"
      unitRef="U_USD">10254.75</ffd:NetFeeAmt>
    <ffd:OfferingNote
      contextRef="C_9b7a5dc3-160a-4fdd-b736-047492f98abc"
      id="F_7ac1d856-9c72-46e9-933b-f48334fdefdd">&lt;div class="item-list-element-wrapper" style="margin-left:4.528%;display:flex;margin-top:6pt;justify-content:flex-start;align-items:baseline;margin-bottom:0;min-width:4.537%;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:'Calibri',sans-serif;font-kerning:none;min-width:4.7521786492374725%;word-break:keep-all;display:inline-flex;justify-content:flex-start;"&gt;1.&lt;/span&gt;&lt;div style="display:inline;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:'Calibri',sans-serif;font-kerning:none;min-width:fit-content;"&gt;Pursuant to Rule 416(a) under the Securities Act of 1933, as amended (the &#x201c;Securities Act&#x201d;), this Registration Statement on Form S-8 (this &#x201c;Registration Statement&#x201d;) shall also cover any additional shares of common stock, par value $0.001 per share (the &#x201c;Common Stock&#x201d;), of Ultragenyx Pharmaceutical Inc. (the &#x201c;Registrant&#x201d;) that become issuable under the Ultragenyx Pharmaceutical Inc. 2023 Incentive Plan (as amended and restated, the &#x201c;2023 Plan&#x201d;). The &#x201c;Amount Registered&#x201d; represents 3,000,000 shares of Common Stock authorized for issuance under the 2023 Plan. The &#x201c;Proposed Maximum Offering Price Per Unit&#x201d; and &#x201c;Maximum Aggregate Offering Price&#x201d; are estimated solely for the purpose of calculating the registration fee pursuant to Rules 457(c) and (h) under the Securities Act, and are based on the average of the high and low sale prices of the Common Stock, as quoted on The Nasdaq Global Select Market, on June 8, 2026.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</ffd:OfferingNote>
    <ffd:OfferingNote
      contextRef="C_122515a6-9ec8-4f5d-b981-51b50f1ef309"
      id="F_5a41eb0c-dbf0-4b91-b233-7a8bb1f25d93">&lt;div class="item-list-element-wrapper" style="margin-left:4.528%;display:flex;margin-top:6pt;justify-content:flex-start;align-items:baseline;margin-bottom:0;min-width:4.537%;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:'Calibri',sans-serif;font-kerning:none;min-width:4.7521786492374725%;word-break:keep-all;display:inline-flex;justify-content:flex-start;"&gt;2.&lt;/span&gt;&lt;div style="display:inline;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:'Calibri',sans-serif;font-kerning:none;min-width:fit-content;"&gt;Pursuant to Rule 416(a) under the Securities Act, this Registration Statement shall also cover any additional shares of Common Stock that become issuable under the Ultragenyx Pharmaceutical Inc. Employment Inducement Plan (as amended, the &#x201c;Inducement Plan&#x201d;). The &#x201c;Amount Registered&#x201d; represents 400,000 shares of Common Stock authorized for issuance under the Inducement Plan. The &#x201c;Proposed Maximum Offering Price Per Unit&#x201d; and &#x201c;Maximum Aggregate Offering Price&#x201d; are estimated solely for the purpose of calculating the registration fee pursuant to Rules 457(c) and (h) under the Securities Act, and are based on the average of the high and low sale prices of the Common Stock, as quoted on The Nasdaq Global Select Market, on June 8, 2026.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</ffd:OfferingNote>
</xbrl>
