{
 "instance": {
  "rare-20220630.htm": {
   "axisCustom": 0,
   "axisStandard": 20,
   "contextCount": 260,
   "dts": {
    "calculationLink": {
     "local": [
      "rare-20220630_cal.xml"
     ]
    },
    "definitionLink": {
     "local": [
      "rare-20220630_def.xml"
     ]
    },
    "inline": {
     "local": [
      "rare-20220630.htm"
     ]
    },
    "labelLink": {
     "local": [
      "rare-20220630_lab.xml"
     ]
    },
    "presentationLink": {
     "local": [
      "rare-20220630_pre.xml"
     ]
    },
    "schema": {
     "local": [
      "rare-20220630.xsd"
     ],
     "remote": [
      "http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xl-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xlink-2003-12-31.xsd",
      "http://www.xbrl.org/2005/xbrldt-2005.xsd",
      "http://www.xbrl.org/2006/ref-2006-02-27.xsd",
      "http://www.xbrl.org/lrr/role/negated-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/reference-2009-12-16.xsd",
      "https://www.xbrl.org/2020/extensible-enumerations-2.0.xsd",
      "https://www.xbrl.org/dtr/type/2020-01-21/types.xsd",
      "https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd",
      "https://xbrl.fasb.org/srt/2021/elts/srt-roles-2021-01-31.xsd",
      "https://xbrl.fasb.org/srt/2021/elts/srt-types-2021-01-31.xsd",
      "https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd",
      "https://xbrl.fasb.org/us-gaap/2021/elts/us-roles-2021-01-31.xsd",
      "https://xbrl.fasb.org/us-gaap/2021/elts/us-types-2021-01-31.xsd",
      "https://xbrl.sec.gov/country/2021/country-2021.xsd",
      "https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd"
     ]
    }
   },
   "elementCount": 415,
   "entityCount": 1,
   "hidden": {
    "http://fasb.org/us-gaap/2021-01-31": 4,
    "http://xbrl.sec.gov/dei/2021q4": 4,
    "total": 8
   },
   "keyCustom": 73,
   "keyStandard": 159,
   "memberCustom": 38,
   "memberStandard": 25,
   "nsprefix": "rare",
   "nsuri": "http://www.ultragenyx.com/20220630",
   "report": {
    "R1": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:DocumentType",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "document",
     "isDefault": "true",
     "longName": "100000 - Document - Document and Entity Information",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation",
     "shortName": "Document and Entity Information",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:DocumentType",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R10": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FinancialInstrumentsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100090 - Disclosure - Financial Instruments",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstruments",
     "shortName": "Financial Instruments",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FinancialInstrumentsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R11": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100100 - Disclosure - Balance Sheet Components",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponents",
     "shortName": "Balance Sheet Components",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R12": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100110 - Disclosure - Revenue",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenue",
     "shortName": "Revenue",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R13": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100120 - Disclosure - License and Research Agreements",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreements",
     "shortName": "License and Research Agreements",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R14": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "rare:LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100130 - Disclosure - Liability Related to the Sale of Future Royalties",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyalties",
     "shortName": "Liability Related to the Sale of Future Royalties",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "rare:LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R15": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100140 - Disclosure - Stock-Based Awards",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwards",
     "shortName": "Stock-Based Awards",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R16": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100150 - Disclosure - Net Loss Per Share",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShare1",
     "shortName": "Net Loss Per Share",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R17": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100160 - Disclosure - Equity Transactions",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactions",
     "shortName": "Equity Transactions",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R18": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ComprehensiveIncomeNoteTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100170 - Disclosure - Accumulated Other Comprehensive Loss",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLoss",
     "shortName": "Accumulated Other Comprehensive Loss",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ComprehensiveIncomeNoteTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R19": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SubsequentEventsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100180 - Disclosure - Subsequent Events",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEvents",
     "shortName": "Subsequent Events",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SubsequentEventsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R2": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "100010 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS",
     "shortName": "CONDENSED CONSOLIDATED BALANCE SHEETS",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:AvailableForSaleSecuritiesDebtSecuritiesCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R20": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "us-gaap:SignificantAccountingPoliciesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfAccountingPolicyPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100190 - Disclosure - Summary of Significant Accounting Policies (Policies)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPolicies",
     "shortName": "Summary of Significant Accounting Policies (Policies)",
     "subGroupType": "policies",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "us-gaap:SignificantAccountingPoliciesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfAccountingPolicyPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R21": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:CashAndCashEquivalentsRestrictedCashAndCashEquivalentsPolicy",
       "div",
       "us-gaap:SignificantAccountingPoliciesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfRestrictedCashAndCashEquivalentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100200 - Disclosure - Summary of Significant Accounting Policies (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesTables",
     "shortName": "Summary of Significant Accounting Policies (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:CashAndCashEquivalentsRestrictedCashAndCashEquivalentsPolicy",
       "div",
       "us-gaap:SignificantAccountingPoliciesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfRestrictedCashAndCashEquivalentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R22": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "us-gaap:FinancialInstrumentsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100210 - Disclosure - Financial Instruments (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsTables",
     "shortName": "Financial Instruments (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "us-gaap:FinancialInstrumentsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R23": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtSecuritiesAvailableForSaleTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100220 - Disclosure - Balance Sheet Components (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsTables",
     "shortName": "Balance Sheet Components (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtSecuritiesAvailableForSaleTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R24": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisaggregationOfRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100230 - Disclosure - Revenue (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueTables",
     "shortName": "Revenue (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisaggregationOfRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R25": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "rare:ScheduleOfCollaborationAndRoyaltyRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100240 - Disclosure - License and Research Agreements (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables",
     "shortName": "License and Research Agreements (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "rare:ScheduleOfCollaborationAndRoyaltyRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R26": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "rare:LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "rare:ScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100250 - Disclosure - Liability Related to the Sale of Future Royalties (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesTables",
     "shortName": "Liability Related to the Sale of Future Royalties (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "rare:LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "rare:ScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R27": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100260 - Disclosure - Stock-Based Awards (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsTables",
     "shortName": "Stock-Based Awards (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R28": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "us-gaap:EarningsPerShareTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100270 - Disclosure - Net Loss Per Share (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareTables",
     "shortName": "Net Loss Per Share (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "us-gaap:EarningsPerShareTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R29": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "us-gaap:ComprehensiveIncomeNoteTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100280 - Disclosure - Accumulated Other Comprehensive Loss (Tables)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossTables",
     "shortName": "Accumulated Other Comprehensive Loss (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "us-gaap:ComprehensiveIncomeNoteTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R3": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:PreferredStockSharesAuthorized",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_shares",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "100020 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical",
     "shortName": "CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:PreferredStockSharesAuthorized",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_shares",
      "xsiNil": "false"
     }
    },
    "R30": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:NatureOfOperations",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_29c6f507-6c23-4972-a186-6297a3e951f9",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:NumberOfReportableSegments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_Segment",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100290 - Disclosure - Organization - Additional Information (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails",
     "shortName": "Organization - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:NatureOfOperations",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_29c6f507-6c23-4972-a186-6297a3e951f9",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:NumberOfReportableSegments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_Segment",
      "xsiNil": "false"
     }
    },
    "R31": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100300 - Disclosure - Summary of Significant Accounting Policies - Summary of Reconciliation of Cash, Cash Equivalents and Restricted Cash (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails",
     "shortName": "Summary of Significant Accounting Policies - Summary of Reconciliation of Cash, Cash Equivalents and Restricted Cash (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "us-gaap:CashAndCashEquivalentsRestrictedCashAndCashEquivalentsPolicy",
       "div",
       "us-gaap:SignificantAccountingPoliciesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_8aad0030-f9d3-4a5a-bdba-41c6f92b0096",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R32": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
       "div",
       "us-gaap:FinancialInstrumentsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:InvestmentsFairValueDisclosure",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100310 - Disclosure - Financial Instruments - Summary of Financial Assets Measured on Recurring Basis (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails",
     "shortName": "Financial Instruments - Summary of Financial Assets Measured on Recurring Basis (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
       "div",
       "us-gaap:FinancialInstrumentsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_7a156486-db2c-48eb-8612-27bcbbabb8b9",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:InvestmentsFairValueDisclosure",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R33": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:DebtSecuritiesAvailableForSaleTableTextBlock",
       "div",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100320 - Disclosure - Balance Sheet Components - Summary of Cash Equivalents and Investments Classified as Available For Sale Securities (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
     "shortName": "Balance Sheet Components - Summary of Cash Equivalents and Investments Classified as Available For Sale Securities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:DebtSecuritiesAvailableForSaleTableTextBlock",
       "div",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R34": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_22cf54c0-223c-4352-9a87-5867d1c150e9",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "rare:AvailableForSaleSecuritiesUnrealizedLossPositionTwelveMonthsOrLongerFairValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100330 - Disclosure - Balance Sheet Components - Additional Information (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
     "shortName": "Balance Sheet Components - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_22cf54c0-223c-4352-9a87-5867d1c150e9",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "rare:AvailableForSaleSecuritiesUnrealizedLossPositionTwelveMonthsOrLongerFairValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R35": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfInventoryCurrentTableTextBlock",
       "div",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:InventoryWorkInProcess",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100340 - Disclosure - Balance Sheet Components - Summary of Inventory (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfInventoryDetails",
     "shortName": "Balance Sheet Components - Summary of Inventory (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfInventoryCurrentTableTextBlock",
       "div",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:InventoryWorkInProcess",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R36": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
       "div",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "rare:ResearchClinicalStudyAndManufacturingExpenses",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100350 - Disclosure - Balance Sheet Components - Accrued Liabilities (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails",
     "shortName": "Balance Sheet Components - Accrued Liabilities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
       "div",
       "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "rare:ResearchClinicalStudyAndManufacturingExpenses",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R37": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100360 - Disclosure - Revenue - Summary of Disaggregation of Total Revenues from Customers (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails",
     "shortName": "Revenue - Summary of Disaggregation of Total Revenues from Customers (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:DisaggregationOfRevenueTableTextBlock",
       "div",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_6e60f62e-43a1-4b5a-af49-5cc057de30a5",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R38": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100370 - Disclosure - Revenue - Summary of Disaggregation of Total Revenues (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails",
     "shortName": "Revenue - Summary of Disaggregation of Total Revenues (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:DisaggregationOfRevenueTableTextBlock",
       "div",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_551c9f89-dcc6-4f7e-b000-8494eb10578f",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R39": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ContractWithCustomerAssetAndLiabilityTableTextBlock",
       "div",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c05101ff-02df-45c7-b8bc-cdf818ef67df",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:ContractWithCustomerLiabilityCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100380 - Disclosure - Revenue - Summary of Changes in Contract Liabilities (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureRevenueSummaryOfChangesInContractLiabilitiesDetails",
     "shortName": "Revenue - Summary of Changes in Contract Liabilities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ContractWithCustomerAssetAndLiabilityTableTextBlock",
       "div",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c05101ff-02df-45c7-b8bc-cdf818ef67df",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:ContractWithCustomerLiabilityCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R4": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "100030 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS (Unaudited)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited",
     "shortName": "CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS (Unaudited)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "lang": null,
      "name": "rare:CostOfSales",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R40": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "rare:PercentageOfGrossAccountsReceivableBalance",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_pure",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100390 - Disclosure - Revenue - Additional Information (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueAdditionalInformationDetails",
     "shortName": "Revenue - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "rare:PercentageOfGrossAccountsReceivableBalance",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_pure",
      "xsiNil": "false"
     }
    },
    "R41": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100400 - Disclosure - License and Research Agreements - Additional Information (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
     "shortName": "License and Research Agreements - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_002bc44c-8a26-492c-aa93-d74cb3131f62",
      "decimals": "-5",
      "lang": null,
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R42": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100410 - Disclosure - License and Research Agreements - Share of Collaboration and Royalty Revenue Related to Crysvita (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
     "shortName": "License and Research Agreements - Share of Collaboration and Royalty Revenue Related to Crysvita (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "rare:ScheduleOfCollaborationAndRoyaltyRevenueTableTextBlock",
       "div",
       "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_4a883b80-f239-4de0-baed-b5ff4323de86",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R43": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "rare:ScheduleOfCostSharingPaymentsTableTextBlock",
       "div",
       "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_0dcf8650-5dd5-4c03-bae2-81007633fa3e",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "rare:CollaborativeArrangementsEffectiveReductionOfExpenseInResearchAndDevelopmentExpenses",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100420 - Disclosure - License and Research Agreements - Schedule of Cost Sharing Payments (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails",
     "shortName": "License and Research Agreements - Schedule of Cost Sharing Payments (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "rare:ScheduleOfCostSharingPaymentsTableTextBlock",
       "div",
       "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_0dcf8650-5dd5-4c03-bae2-81007633fa3e",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "rare:CollaborativeArrangementsEffectiveReductionOfExpenseInResearchAndDevelopmentExpenses",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R44": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
       "div",
       "us-gaap:FinancialInstrumentsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c05101ff-02df-45c7-b8bc-cdf818ef67df",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:InvestmentsFairValueDisclosure",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100430 - Disclosure - License and Research Agreements - Schedule of Changes in Fair Value of Equity Investment (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails",
     "shortName": "License and Research Agreements - Schedule of Changes in Fair Value of Equity Investment (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "rare:CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_03c76b22-129d-4c71-84ba-2d604cbcd867",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:InvestmentsFairValueDisclosure",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R45": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "rare:LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_4858285c-9546-41de-9209-9f8838fac9bd",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "rare:ProceedsFromSaleOfFutureRoyalties",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100440 - Disclosure - Liability Related to the Sale of Future Royalties - Additional Information (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
     "shortName": "Liability Related to the Sale of Future Royalties - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "rare:LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_4858285c-9546-41de-9209-9f8838fac9bd",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "rare:ProceedsFromSaleOfFutureRoyalties",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R46": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c05101ff-02df-45c7-b8bc-cdf818ef67df",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "rare:LiabilityRelatedToSaleOfFutureRoyalties",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100450 - Disclosure - Liability Related to the Sale of Future Royalties - Schedule of Activity Within Liability Related to Sale of Future Royalties (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesDetails",
     "shortName": "Liability Related to the Sale of Future Royalties - Schedule of Activity Within Liability Related to Sale of Future Royalties (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "rare:ScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesTableTextBlock",
       "div",
       "rare:LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_1691e749-2f9f-4e04-a2c0-484b582dc33d",
      "decimals": "-3",
      "lang": null,
      "name": "rare:NonCashCollaborationRoyaltyRevenue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R47": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_b4a970ed-396f-4353-9b10-05ff045b0bbf",
      "decimals": "0",
      "first": true,
      "lang": null,
      "name": "us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_shares",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100460 - Disclosure - Stock-Based Awards - Additional Information (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails",
     "shortName": "Stock-Based Awards - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_b4a970ed-396f-4353-9b10-05ff045b0bbf",
      "decimals": "0",
      "first": true,
      "lang": null,
      "name": "us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_shares",
      "xsiNil": "false"
     }
    },
    "R48": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
       "div",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AllocatedShareBasedCompensationExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100470 - Disclosure - Stock-Based Awards - Summary of Stock-Based Compensation Expense (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails",
     "shortName": "Stock-Based Awards - Summary of Stock-Based Compensation Expense (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
       "div",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AllocatedShareBasedCompensationExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R49": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
       "div",
       "us-gaap:EarningsPerShareTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "0",
      "first": true,
      "lang": null,
      "name": "us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_shares",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100480 - Disclosure - Net Loss Per Share - Outstanding Shares of Common Stock Equivalents Excluded from Computation of Diluted Net Loss per Share (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails",
     "shortName": "Net Loss Per Share - Outstanding Shares of Common Stock Equivalents Excluded from Computation of Diluted Net Loss per Share (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
       "div",
       "us-gaap:EarningsPerShareTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "0",
      "first": true,
      "lang": null,
      "name": "us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_shares",
      "xsiNil": "false"
     }
    },
    "R5": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:NetIncomeLoss",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "100040 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS (Unaudited)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited",
     "shortName": "CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS (Unaudited)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_c369e9a7-adc7-4bbb-ae84-0c679e05ff29",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationGainLossArisingDuringPeriodNetOfTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R50": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "rare:StockIssuedDuringPeriodSharesAtMarketOffering",
      "reportCount": 1,
      "unitRef": "U_shares",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100490 - Disclosure - Equity Transactions - Additional Information (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails",
     "shortName": "Equity Transactions - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": "-5",
      "lang": null,
      "name": "rare:ProceedsFromIssuanceOfCommonStockAtMarketOffering",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R51": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
       "div",
       "us-gaap:ComprehensiveIncomeNoteTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100500 - Disclosure - Accumulated Other Comprehensive Income - Schedule of Total Accumulated Other Comprehensive Loss (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveIncomeScheduleOfTotalAccumulatedOtherComprehensiveLossDetails",
     "shortName": "Accumulated Other Comprehensive Income - Schedule of Total Accumulated Other Comprehensive Loss (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
       "div",
       "us-gaap:ComprehensiveIncomeNoteTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_f28303c7-e07b-4dfc-a085-ac6ed6f5ec90",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R52": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:SubsequentEventsTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_cb1f01fe-24c8-4bbb-80b1-e21e9796ac7f",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "rare:ProfitLossSharingPercentageOnNetSales",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_pure",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100510 - Disclosure - Subsequent Event - Additional Information (Details)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
     "shortName": "Subsequent Event - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:SubsequentEventsTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_cb1f01fe-24c8-4bbb-80b1-e21e9796ac7f",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "rare:ProfitLossSharingPercentageOnNetSales",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_pure",
      "xsiNil": "false"
     }
    },
    "R6": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_13cd7c59-ed07-4f6b-90b9-c8ed6369ea47",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:StockholdersEquity",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "100050 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY (Unaudited)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited",
     "shortName": "CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY (Unaudited)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_44956e33-694c-419b-8232-90d6208f7110",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R7": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:NetIncomeLoss",
      "reportCount": 1,
      "unitRef": "U_USD",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "100060 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS (Unaudited)",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited",
     "shortName": "CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS (Unaudited)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "td",
       "tr",
       "table",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": "-3",
      "lang": null,
      "name": "rare:AllocatedShareBasedCompensationExpenseNetOfCapitalizedInventoryCost",
      "reportCount": 1,
      "unique": true,
      "unitRef": "U_USD",
      "xsiNil": "false"
     }
    },
    "R8": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NatureOfOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100070 - Disclosure - Organization",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganization",
     "shortName": "Organization",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NatureOfOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R9": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "100080 - Disclosure - Summary of Significant Accounting Policies",
     "role": "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPolicies",
     "shortName": "Summary of Significant Accounting Policies",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "rare-20220630.htm",
      "contextRef": "C_329eddbb-0872-4fef-bf64-8aabe957d732",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    }
   },
   "segmentCount": 63,
   "tag": {
    "country_US": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "UNITED STATES",
        "terseLabel": "United States of America"
       }
      }
     },
     "localname": "US",
     "nsuri": "http://xbrl.sec.gov/country/2021",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "dei_AmendmentFlag": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the XBRL content amends previously-filed or accepted submission.",
        "label": "Amendment Flag",
        "terseLabel": "Amendment Flag"
       }
      }
     },
     "localname": "AmendmentFlag",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_CityAreaCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Area code of city",
        "label": "City Area Code",
        "terseLabel": "City Area Code"
       }
      }
     },
     "localname": "CityAreaCode",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_CoverAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cover page.",
        "label": "Cover [Abstract]"
       }
      }
     },
     "localname": "CoverAbstract",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "xbrltype": "stringItemType"
    },
    "dei_CurrentFiscalYearEndDate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "End date of current fiscal year in the format --MM-DD.",
        "label": "Current Fiscal Year End Date",
        "terseLabel": "Current Fiscal Year End Date"
       }
      }
     },
     "localname": "CurrentFiscalYearEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "gMonthDayItemType"
    },
    "dei_DocumentFiscalPeriodFocus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Fiscal period values are FY, Q1, Q2, and Q3.  1st, 2nd and 3rd quarter 10-Q or 10-QT statements have value Q1, Q2, and Q3 respectively, with 10-K, 10-KT or other fiscal year statements having FY.",
        "label": "Document Fiscal Period Focus",
        "terseLabel": "Document Fiscal Period Focus"
       }
      }
     },
     "localname": "DocumentFiscalPeriodFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "fiscalPeriodItemType"
    },
    "dei_DocumentFiscalYearFocus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This is focus fiscal year of the document report in YYYY format. For a 2006 annual report, which may also provide financial information from prior periods, fiscal 2006 should be given as the fiscal year focus. Example: 2006.",
        "label": "Document Fiscal Year Focus",
        "terseLabel": "Document Fiscal Year Focus"
       }
      }
     },
     "localname": "DocumentFiscalYearFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "gYearItemType"
    },
    "dei_DocumentPeriodEndDate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "For the EDGAR submission types of Form 8-K: the date of the report, the date of the earliest event reported; for the EDGAR submission types of Form N-1A: the filing date; for all other submission types: the end of the reporting or transition period.  The format of the date is YYYY-MM-DD.",
        "label": "Document Period End Date",
        "terseLabel": "Document Period End Date"
       }
      }
     },
     "localname": "DocumentPeriodEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "dateItemType"
    },
    "dei_DocumentQuarterlyReport": {
     "auth_ref": [
      "r447"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as an quarterly report.",
        "label": "Document Quarterly Report",
        "terseLabel": "Document Quarterly Report"
       }
      }
     },
     "localname": "DocumentQuarterlyReport",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentTransitionReport": {
     "auth_ref": [
      "r448"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as a transition report.",
        "label": "Document Transition Report",
        "terseLabel": "Document Transition Report"
       }
      }
     },
     "localname": "DocumentTransitionReport",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentType": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The type of document being provided (such as 10-K, 10-Q, 485BPOS, etc). The document type is limited to the same value as the supporting SEC submission type, or the word 'Other'.",
        "label": "Document Type",
        "terseLabel": "Document Type"
       }
      }
     },
     "localname": "DocumentType",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "submissionTypeItemType"
    },
    "dei_EntityAddressAddressLine1": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Address Line 1 such as Attn, Building Name, Street Name",
        "label": "Entity Address, Address Line One",
        "terseLabel": "Entity Address, Address Line One"
       }
      }
     },
     "localname": "EntityAddressAddressLine1",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressCityOrTown": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the City or Town",
        "label": "Entity Address, City or Town",
        "terseLabel": "Entity Address, City or Town"
       }
      }
     },
     "localname": "EntityAddressCityOrTown",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressPostalZipCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Code for the postal or zip code",
        "label": "Entity Address, Postal Zip Code",
        "terseLabel": "Entity Address, Postal Zip Code"
       }
      }
     },
     "localname": "EntityAddressPostalZipCode",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressStateOrProvince": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the state or province.",
        "label": "Entity Address, State or Province",
        "terseLabel": "Entity Address, State or Province"
       }
      }
     },
     "localname": "EntityAddressStateOrProvince",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "stateOrProvinceItemType"
    },
    "dei_EntityCentralIndexKey": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A unique 10-digit SEC-issued value to identify entities that have filed disclosures with the SEC. It is commonly abbreviated as CIK.",
        "label": "Entity Central Index Key",
        "terseLabel": "Entity Central Index Key"
       }
      }
     },
     "localname": "EntityCentralIndexKey",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "centralIndexKeyItemType"
    },
    "dei_EntityCommonStockSharesOutstanding": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.",
        "label": "Entity Common Stock, Shares Outstanding",
        "terseLabel": "Entity Common Stock, Shares Outstanding"
       }
      }
     },
     "localname": "EntityCommonStockSharesOutstanding",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "sharesItemType"
    },
    "dei_EntityCurrentReportingStatus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate 'Yes' or 'No' whether registrants (1) have filed all reports required to be filed by Section 13 or 15(d) of the Securities Exchange Act of 1934 during the preceding 12 months (or for such shorter period that registrants were required to file such reports), and (2) have been subject to such filing requirements for the past 90 days. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Current Reporting Status",
        "terseLabel": "Entity Current Reporting Status"
       }
      }
     },
     "localname": "EntityCurrentReportingStatus",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "All the names of the entities being reported upon in a document. Any legal structure used to conduct activities or to hold assets. Some examples of such structures are corporations, partnerships, limited liability companies, grantor trusts, and other trusts. This item does not include business and geographical segments which are included in the geographical or business segments domains.",
        "label": "Entity [Domain]",
        "terseLabel": "Entity"
       }
      }
     },
     "localname": "EntityDomain",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "dei_EntityEmergingGrowthCompany": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate if registrant meets the emerging growth company criteria.",
        "label": "Entity Emerging Growth Company",
        "terseLabel": "Entity Emerging Growth Company"
       }
      }
     },
     "localname": "EntityEmergingGrowthCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityFileNumber": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Commission file number. The field allows up to 17 characters. The prefix may contain 1-3 digits, the sequence number may contain 1-8 digits, the optional suffix may contain 1-4 characters, and the fields are separated with a hyphen.",
        "label": "Entity File Number",
        "terseLabel": "Entity File Number"
       }
      }
     },
     "localname": "EntityFileNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "fileNumberItemType"
    },
    "dei_EntityFilerCategory": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate whether the registrant is one of the following: Large Accelerated Filer, Accelerated Filer, Non-accelerated Filer. Definitions of these categories are stated in Rule 12b-2 of the Exchange Act. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Filer Category",
        "terseLabel": "Entity Filer Category"
       }
      }
     },
     "localname": "EntityFilerCategory",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "filerCategoryItemType"
    },
    "dei_EntityIncorporationStateCountryCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Two-character EDGAR code representing the state or country of incorporation.",
        "label": "Entity Incorporation, State or Country Code",
        "terseLabel": "Entity Incorporation, State or Country Code"
       }
      }
     },
     "localname": "EntityIncorporationStateCountryCode",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "edgarStateCountryItemType"
    },
    "dei_EntityInteractiveDataCurrent": {
     "auth_ref": [
      "r449"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant has submitted electronically every Interactive Data File required to be submitted pursuant to Rule 405 of Regulation S-T during the preceding 12 months (or for such shorter period that the registrant was required to submit such files).",
        "label": "Entity Interactive Data Current",
        "terseLabel": "Entity Interactive Data Current"
       }
      }
     },
     "localname": "EntityInteractiveDataCurrent",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityRegistrantName": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The exact name of the entity filing the report as specified in its charter, which is required by forms filed with the SEC.",
        "label": "Entity Registrant Name",
        "terseLabel": "Entity Registrant Name"
       }
      }
     },
     "localname": "EntityRegistrantName",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityShellCompany": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant is a shell company as defined in Rule 12b-2 of the Exchange Act.",
        "label": "Entity Shell Company",
        "terseLabel": "Entity Shell Company"
       }
      }
     },
     "localname": "EntityShellCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntitySmallBusiness": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicates that the company is a Smaller Reporting Company (SRC).",
        "label": "Entity Small Business",
        "terseLabel": "Entity Small Business"
       }
      }
     },
     "localname": "EntitySmallBusiness",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityTaxIdentificationNumber": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The Tax Identification Number (TIN), also known as an Employer Identification Number (EIN), is a unique 9-digit value assigned by the IRS.",
        "label": "Entity Tax Identification Number",
        "terseLabel": "Entity Tax Identification Number"
       }
      }
     },
     "localname": "EntityTaxIdentificationNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "employerIdItemType"
    },
    "dei_LegalEntityAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The set of legal entities associated with a report.",
        "label": "Legal Entity [Axis]",
        "terseLabel": "Legal Entity"
       }
      }
     },
     "localname": "LegalEntityAxis",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "dei_LocalPhoneNumber": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Local phone number for entity.",
        "label": "Local Phone Number",
        "terseLabel": "Local Phone Number"
       }
      }
     },
     "localname": "LocalPhoneNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_Security12bTitle": {
     "auth_ref": [
      "r444"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Title of a 12(b) registered security.",
        "label": "Title of 12(b) Security",
        "terseLabel": "Title of 12(b) Security"
       }
      }
     },
     "localname": "Security12bTitle",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "securityTitleItemType"
    },
    "dei_SecurityExchangeName": {
     "auth_ref": [
      "r446"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the Exchange on which a security is registered.",
        "label": "Security Exchange Name",
        "terseLabel": "Security Exchange Name"
       }
      }
     },
     "localname": "SecurityExchangeName",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "edgarExchangeCodeItemType"
    },
    "dei_TradingSymbol": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Trading symbol of an instrument as listed on an exchange.",
        "label": "Trading Symbol",
        "terseLabel": "Trading Symbol"
       }
      }
     },
     "localname": "TradingSymbol",
     "nsuri": "http://xbrl.sec.gov/dei/2021q4",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "tradingSymbolItemType"
    },
    "rare_AbeonaMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Abeona [Member]",
        "label": "Abeona [Member]",
        "terseLabel": "Abeona"
       }
      }
     },
     "localname": "AbeonaMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_AdditionalMilestonePayments": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Additional milestone payments.",
        "label": "Additional Milestone Payments",
        "terseLabel": "Additional milestone payments"
       }
      }
     },
     "localname": "AdditionalMilestonePayments",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_AllocatedShareBasedCompensationExpenseNetOfCapitalizedInventoryCost": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Allocated share based compensation expense net of capitalized inventory cost.",
        "label": "Allocated Share Based Compensation Expense Net Of Capitalized Inventory Cost",
        "terseLabel": "Stock-based compensation"
       }
      }
     },
     "localname": "AllocatedShareBasedCompensationExpenseNetOfCapitalizedInventoryCost",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ArcturusResearchCollaborationAndLicenseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Arcturus research collaboration and license agreement.",
        "label": "Arcturus Research Collaboration And License Agreement [Member]",
        "terseLabel": "Arcturus",
        "verboseLabel": "Arcturus"
       }
      }
     },
     "localname": "ArcturusResearchCollaborationAndLicenseAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_AvailableForSaleSecuritiesContractualMaturity": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Available for sale securities contractual maturity.",
        "label": "Available For Sale Securities Contractual Maturity",
        "terseLabel": "Available-for-sale securities remaining contractual maturities"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesContractualMaturity",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "rare_AvailableForSaleSecuritiesUnrealizedLossPositionAccumulatedLoss": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Available For Sale Securities Unrealized Loss Position Accumulated Loss.",
        "label": "Available For Sale Securities Unrealized Loss Position Accumulated Loss",
        "terseLabel": "Available for sale securities unrealized loss position accumulated loss"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesUnrealizedLossPositionAccumulatedLoss",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_AvailableForSaleSecuritiesUnrealizedLossPositionTwelveMonthsOrLongerFairValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Available For Sale Securities Unrealized Loss Position Twelve Months Or Longer Fair Value.",
        "label": "Available For Sale Securities Unrealized Loss Position Twelve Months Or Longer Fair Value",
        "terseLabel": "Available-for-sale securities, unrealized loss position, twelve months or longer, fair value"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesUnrealizedLossPositionTwelveMonthsOrLongerFairValue",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_BusinessCombinationUpfrontPayment": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Business combination upfront payment.",
        "label": "Business Combination Upfront Payment",
        "terseLabel": "Upfront payment for exclusive option to acquisition"
       }
      }
     },
     "localname": "BusinessCombinationUpfrontPayment",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_CertificateOfDepositsAndTimeDepositsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Certificate of deposits and time deposits.",
        "label": "Certificate Of Deposits And Time Deposits [Member]",
        "terseLabel": "Certificate of Deposits and Time Deposits"
       }
      }
     },
     "localname": "CertificateOfDepositsAndTimeDepositsMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_CollaborationAndLicenseMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaboration and license.",
        "label": "Collaboration And License [Member]",
        "terseLabel": "Collaboration and License"
       }
      }
     },
     "localname": "CollaborationAndLicenseMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_CollaborationAndRoyaltyMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaboration and royalty.",
        "label": "Collaboration And Royalty [Member]",
        "terseLabel": "Collaboration and Royalty"
       }
      }
     },
     "localname": "CollaborationAndRoyaltyMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaborative arrangement and noncollaborative arrangement transactions disclosure.",
        "label": "Collaborative Arrangement And Noncollaborative Arrangement Transactions Disclosure [Text Block]",
        "terseLabel": "License and Research Agreements"
       }
      }
     },
     "localname": "CollaborativeArrangementAndNoncollaborativeArrangementTransactionsDisclosureTextBlock",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreements"
     ],
     "xbrltype": "textBlockItemType"
    },
    "rare_CollaborativeArrangementsEffectiveReductionOfExpense": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaborative arrangements effective reduction of expense.",
        "label": "Collaborative Arrangements Effective Reduction Of Expense",
        "totalLabel": "Total"
       }
      }
     },
     "localname": "CollaborativeArrangementsEffectiveReductionOfExpense",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_CollaborativeArrangementsEffectiveReductionOfExpenseInResearchAndDevelopmentExpenses": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails": {
       "order": 0.0,
       "parentTag": "rare_CollaborativeArrangementsEffectiveReductionOfExpense",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaborative arrangements effective reduction of expense in research and development expenses.",
        "label": "Collaborative Arrangements Effective Reduction Of Expense In Research And Development Expenses",
        "terseLabel": "Research and development"
       }
      }
     },
     "localname": "CollaborativeArrangementsEffectiveReductionOfExpenseInResearchAndDevelopmentExpenses",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_CollaborativeArrangementsEffectiveReductionOfExpenseInSellingGeneralAndAdministrativeExpenses": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails": {
       "order": 1.0,
       "parentTag": "rare_CollaborativeArrangementsEffectiveReductionOfExpense",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaborative arrangements effective reduction of expense in selling, general and administrative expenses.",
        "label": "Collaborative Arrangements Effective Reduction Of Expense In Selling General And Administrative Expenses",
        "terseLabel": "Selling, general and administrative"
       }
      }
     },
     "localname": "CollaborativeArrangementsEffectiveReductionOfExpenseInSellingGeneralAndAdministrativeExpenses",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_CommercialAndDevelopmentActivityReimbursementsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Commercial and development activity reimbursements.",
        "label": "Commercial And Development Activity Reimbursements [Member]",
        "terseLabel": "Commercial and Development Activity Reimbursements"
       }
      }
     },
     "localname": "CommercialAndDevelopmentActivityReimbursementsMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_CommercialMilestonePayment": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Commercial milestone payment.",
        "label": "Commercial Milestone Payment",
        "terseLabel": "Commercial milestone payment"
       }
      }
     },
     "localname": "CommercialMilestonePayment",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_CommercialMilestonePayments": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Commercial milestone payments.",
        "label": "Commercial Milestone Payments",
        "terseLabel": "Commercial milestone payments"
       }
      }
     },
     "localname": "CommercialMilestonePayments",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ContractLiabilitiesCurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract liabilities current.",
        "label": "Contract Liabilities Current",
        "terseLabel": "Contract liabilities"
       }
      }
     },
     "localname": "ContractLiabilitiesCurrent",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ContractLiabilitiesNoncurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 2.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract liabilities noncurrent.",
        "label": "Contract Liabilities Noncurrent",
        "terseLabel": "Contract liabilities"
       }
      }
     },
     "localname": "ContractLiabilitiesNoncurrent",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ContractWithCustomerAssetsLiabilityAdditionsDuringPeriod": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract with customer assets (liability) additions during period.",
        "label": "Contract With Customer Assets Liability Additions During Period",
        "terseLabel": "Additions"
       }
      }
     },
     "localname": "ContractWithCustomerAssetsLiabilityAdditionsDuringPeriod",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureRevenueSummaryOfChangesInContractLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ContractWithCustomerAssetsLiabilityCurrent": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract with customer assets (liability) current.",
        "label": "Contract With Customer Assets Liability Current",
        "periodEndLabel": "Balance of contract assets (liabilities) at end of period",
        "periodStartLabel": "Balance of contract liabilities at beginning of period",
        "terseLabel": "Balance of contract liabilities at beginning of period"
       }
      }
     },
     "localname": "ContractWithCustomerAssetsLiabilityCurrent",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureRevenueSummaryOfChangesInContractLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ContractWithCustomerAssetsLiabilityDeductionsDuringPeriod": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract with customer (assets) liability deductions during period.",
        "label": "Contract With Customer assets Liability Deductions During Period",
        "terseLabel": "Deductions"
       }
      }
     },
     "localname": "ContractWithCustomerAssetsLiabilityDeductionsDuringPeriod",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureRevenueSummaryOfChangesInContractLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_CostOfSales": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 0.0,
       "parentTag": "rare_CostOfSalesAndOperatingExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cost of sales.",
        "label": "Cost Of Sales",
        "terseLabel": "Cost of sales"
       }
      }
     },
     "localname": "CostOfSales",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_CostOfSalesAndOperatingExpenses": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 1.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cost of sales and operating expenses.",
        "label": "Cost Of Sales And Operating Expenses",
        "totalLabel": "Total operating expenses"
       }
      }
     },
     "localname": "CostOfSalesAndOperatingExpenses",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_CostSharingPaymentsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cost sharing payments abstract.",
        "label": "Cost Sharing Payments [Abstract]"
       }
      }
     },
     "localname": "CostSharingPaymentsAbstract",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "xbrltype": "stringItemType"
    },
    "rare_CostSharingPaymentsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cost sharing payments line items.",
        "label": "Cost Sharing Payments [Line Items]",
        "terseLabel": "Cost Sharing Payments [Line Items]"
       }
      }
     },
     "localname": "CostSharingPaymentsLineItems",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_CostSharingPaymentsTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cost sharing payments table.",
        "label": "Cost Sharing Payments [Table]",
        "terseLabel": "Cost Sharing Payments [Table]"
       }
      }
     },
     "localname": "CostSharingPaymentsTable",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_CrysvitaMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Crysvita.",
        "label": "Crysvita [Member]",
        "terseLabel": "Crysvita"
       }
      }
     },
     "localname": "CrysvitaMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_DaiichiSankyoCoLtdMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Daiichi Sankyo Co., Ltd.",
        "label": "Daiichi Sankyo Co Ltd [Member]",
        "terseLabel": "Daiichi Sankyo"
       }
      }
     },
     "localname": "DaiichiSankyoCoLtdMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_DebtSecuritiesInGovernmentSponsoredEntitiesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Debt securities in government sponsored entities.",
        "label": "Debt Securities In Government Sponsored Entities [Member]",
        "terseLabel": "Debt Securities in Government Sponsored Entities"
       }
      }
     },
     "localname": "DebtSecuritiesInGovernmentSponsoredEntitiesMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_DevelopmentAndTransitionCosts": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Development And Transition Costs",
        "label": "Development And Transition Costs",
        "terseLabel": "Development and transition costs"
       }
      }
     },
     "localname": "DevelopmentAndTransitionCosts",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_DojolviMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Dojolvi.",
        "label": "Dojolvi [Member]",
        "terseLabel": "Dojolvi"
       }
      }
     },
     "localname": "DojolviMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_EligibleFutureMilestonePayments": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Eligible future milestone payments.",
        "label": "Eligible Future Milestone Payments",
        "terseLabel": "Eligible future milestone payments"
       }
      }
     },
     "localname": "EligibleFutureMilestonePayments",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_EmploymentInducementPlanMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Employment inducement plan.",
        "label": "Employment Inducement Plan [Member]",
        "terseLabel": "Employment Inducement Plan"
       }
      }
     },
     "localname": "EmploymentInducementPlanMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_EquityInvestmentsNoncurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 2.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Equity investments noncurrent.",
        "label": "Equity Investments Noncurrent",
        "terseLabel": "Equity investments"
       }
      }
     },
     "localname": "EquityInvestmentsNoncurrent",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_EstimatedReimbursementOfDeliveringLicenseAndTechnologyServices": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Estimated reimbursement of delivering license and technology services.",
        "label": "Estimated Reimbursement Of Delivering License And Technology Services",
        "terseLabel": "Estimated reimbursement of delivering license and technology services"
       }
      }
     },
     "localname": "EstimatedReimbursementOfDeliveringLicenseAndTechnologyServices",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_EuropeanUnionAndSwitzerlandAndTurkeyMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "European Union and Switzerland and Turkey.",
        "label": "European Union And Switzerland And Turkey [Member]",
        "terseLabel": "Royalty Revenue in European Territory"
       }
      }
     },
     "localname": "EuropeanUnionAndSwitzerlandAndTurkeyMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_ExclusiveOptionsSubjectToOptionExercisePeriod": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Exclusive options subject to option exercise period.",
        "label": "Exclusive Options Subject To Option Exercise Period",
        "terseLabel": "Business acquisition option exercise period, description"
       }
      }
     },
     "localname": "ExclusiveOptionsSubjectToOptionExercisePeriod",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_FairValueOfSaleOfShares": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Fair value of sale of shares.",
        "label": "Fair Value Of Sale Of Shares",
        "terseLabel": "Common stock, Sale of shares"
       }
      }
     },
     "localname": "FairValueOfSaleOfShares",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_FutureContingentMilestonePayments": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Future contingent milestone payments.",
        "label": "Future Contingent Milestone Payments",
        "terseLabel": "Future contingent milestone payments"
       }
      }
     },
     "localname": "FutureContingentMilestonePayments",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_GeneTxBiotherapeuticsLLCMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "GeneTx Biotherapeutics LLC.",
        "label": "Gene Tx Biotherapeutics L L C [Member]",
        "terseLabel": "GeneTx Biotherapeutics LLC"
       }
      }
     },
     "localname": "GeneTxBiotherapeuticsLLCMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_GenetxMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "GeneTx [Member]",
        "label": "GeneTx [Member]",
        "terseLabel": "GeneTx"
       }
      }
     },
     "localname": "GenetxMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_HeLAPCLPlatformMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "HeLA PCL platform.",
        "label": "He L A P C L Platform [Member]",
        "terseLabel": "HeLA PCL Platform"
       }
      }
     },
     "localname": "HeLAPCLPlatformMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_IncreaseDecreaseInAccountsPayableAccruedLiabilitiesAndOtherOperatingLiabilities": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 12.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Increase decrease in accounts payable accrued liabilities and other operating liabilities.",
        "label": "Increase Decrease In Accounts Payable Accrued Liabilities And Other Operating Liabilities",
        "terseLabel": "Accounts payable, accrued, and other liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsPayableAccruedLiabilitiesAndOtherOperatingLiabilities",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_IncreaseDecreaseInContractLiabilities": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 11.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Increase decrease in contract liabilities.",
        "label": "Increase Decrease In Contract Liabilities",
        "terseLabel": "Contract liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInContractLiabilities",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_InterestRateOfFutureRoyaltyPayments": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Interest Rate of Future Royalty payments",
        "label": "Interest Rate of Future Royalty payments",
        "terseLabel": "Interest Rate of Future Royalty payments"
       }
      }
     },
     "localname": "InterestRateOfFutureRoyaltyPayments",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_InvestmentsInArcturusAndSolidCommonStockMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Investments in Arcturus and solid common stock.",
        "label": "Investments In Arcturus And Solid Common Stock [Member]",
        "terseLabel": "Investments in Arcturus and Solid Common Stock"
       }
      }
     },
     "localname": "InvestmentsInArcturusAndSolidCommonStockMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_IssuanceOfCommonStockInConnectionWithLicenseAgreementNetOfIssuanceCostsShares": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Issuance of common stock in connection with license agreement net of issuance costs shares.",
        "label": "Issuance Of Common Stock In Connection With License Agreement Net Of Issuance Costs Shares",
        "terseLabel": "Issuance of common stock in connection with license agreement, net of issuance costs, shares"
       }
      }
     },
     "localname": "IssuanceOfCommonStockInConnectionWithLicenseAgreementNetOfIssuanceCostsShares",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "sharesItemType"
    },
    "rare_IssuanceOfCommonStockUnderEquityPlanAwardsNetOfTax": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Issuance of common stock under equity plan awards, net of tax.",
        "label": "Issuance Of Common Stock Under Equity Plan Awards Net Of Tax",
        "terseLabel": "Issuance of common stock under equity plan awards, net of tax"
       }
      }
     },
     "localname": "IssuanceOfCommonStockUnderEquityPlanAwardsNetOfTax",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_IssuanceOfCommonStockUnderEquityPlanAwardsNetOfTaxShares": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Issuance of common stock under equity plan awards, net of tax, shares.",
        "label": "Issuance Of Common Stock Under Equity Plan Awards Net Of Tax Shares",
        "terseLabel": "Issuance of common stock under equity plan awards, net of tax, shares"
       }
      }
     },
     "localname": "IssuanceOfCommonStockUnderEquityPlanAwardsNetOfTaxShares",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "sharesItemType"
    },
    "rare_IssuanceOfCommonStockUponExerciseOfWarrantsAndUnderEquityPlanAwardsNetOfTax": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Issuance of common stock upon exercise of warrants and under equity plan awards, net of tax",
        "label": "Issuance Of Common Stock Upon Exercise Of Warrants And Under Equity Plan Awards Net Of Tax",
        "terseLabel": "Issuance of common stock upon exercise of warrants and under equity plan awards, net of tax"
       }
      }
     },
     "localname": "IssuanceOfCommonStockUponExerciseOfWarrantsAndUnderEquityPlanAwardsNetOfTax",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_IssuanceOfCommonStockUponExerciseOfWarrantsAndUnderEquityPlanAwardsNetOfTaxShares": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Issuance of common stock upon exercise of warrants and under equity plan awards, net of tax, shares.",
        "label": "Issuance Of Common Stock Upon Exercise Of Warrants And Under Equity Plan Awards Net Of Tax Shares",
        "terseLabel": "Issuance of common stock upon exercise of warrants and under equity plan awards, net of tax, shares"
       }
      }
     },
     "localname": "IssuanceOfCommonStockUponExerciseOfWarrantsAndUnderEquityPlanAwardsNetOfTaxShares",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "sharesItemType"
    },
    "rare_IssuanceOfCommonStockValueInConnectionWithLicenseAgreement": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Issuance of common stock value in connection with license agreement.",
        "label": "Issuance Of Common Stock Value In Connection With License Agreement",
        "terseLabel": "Issuance of common stock in connection with license agreement, net of issuance costs"
       }
      }
     },
     "localname": "IssuanceOfCommonStockValueInConnectionWithLicenseAgreement",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_KyowaKirinCollaborationMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Kyowa Kirin Collaboration.",
        "label": "Kyowa Kirin Collaboration [Member]",
        "terseLabel": "Kyowa Kirin Collaboration"
       }
      }
     },
     "localname": "KyowaKirinCollaborationMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_LiabilityRelatedToSaleOfFutureRoyalties": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 5.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Liability related to sale of future royalties.",
        "label": "Liability Related To Sale Of Future Royalties",
        "periodEndLabel": "Liability related to the sale of future royalties at end of year",
        "periodStartLabel": "Liability related to the sale of future royalties at beginning of year",
        "terseLabel": "Liability related to the sale of future royalties"
       }
      }
     },
     "localname": "LiabilityRelatedToSaleOfFutureRoyalties",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_LiabilityRelatedToSaleOfFutureRoyaltiesLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Liability related to sale of future royalties.",
        "label": "Liability Related To Sale Of Future Royalties [Line Items]",
        "terseLabel": "Liability Related To Sale Of Future Royalties [Line Items]"
       }
      }
     },
     "localname": "LiabilityRelatedToSaleOfFutureRoyaltiesLineItems",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_LiabilityRelatedToSaleOfFutureRoyaltiesTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Liability related to sale of future royalties.",
        "label": "Liability Related To Sale Of Future Royalties [Table]",
        "terseLabel": "Liability Related To Sale Of Future Royalties [Table]"
       }
      }
     },
     "localname": "LiabilityRelatedToSaleOfFutureRoyaltiesTable",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Liability related to sale of future royalties.",
        "label": "Liability Related To Sale Of Future Royalties [Text Block]",
        "terseLabel": "Liability Related to the Sale of Future Royalties"
       }
      }
     },
     "localname": "LiabilityRelatedToSaleOfFutureRoyaltiesTextBlock",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyalties"
     ],
     "xbrltype": "textBlockItemType"
    },
    "rare_LicenseAndCollaborationAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "License and collaboration agreement.",
        "label": "License And Collaboration Agreement [Member]",
        "terseLabel": "License and Collaboration Agreement"
       }
      }
     },
     "localname": "LicenseAndCollaborationAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_LicenseAndTechnologyAccessAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "License and technology access agreement.",
        "label": "License And Technology Access Agreement [Member]",
        "terseLabel": "License and Technology Access Agreement"
       }
      }
     },
     "localname": "LicenseAndTechnologyAccessAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_LicensesAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Licenses Agreement.",
        "label": "Licenses Agreement [Member]",
        "terseLabel": "License Agreement"
       }
      }
     },
     "localname": "LicensesAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_MepseviiMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Mepsevii.",
        "label": "Mepsevii [Member]",
        "terseLabel": "Mepsevii"
       }
      }
     },
     "localname": "MepseviiMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_MereoBioPharma3LimitedMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Mereo BioPharma 3 Limited.",
        "label": "Mereo Bio Pharma3 Limited [Member]",
        "terseLabel": "Mereo"
       }
      }
     },
     "localname": "MereoBioPharma3LimitedMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_NonCashCollaborationRoyaltyRevenue": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Non cash collaboration royalty revenue.",
        "label": "Non Cash Collaboration Royalty Revenue",
        "negatedLabel": "Non-cash collaboration royalty revenue"
       }
      }
     },
     "localname": "NonCashCollaborationRoyaltyRevenue",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_NonCashInterestExpenseOnLiabilityRelatedToSaleOfFutureRoyalties": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 3.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Non cash interest expense on liability related to sale of future royalties.",
        "label": "Non Cash Interest Expense On Liability Related To Sale Of Future Royalties",
        "negatedLabel": "Non-cash interest expense on liability related to the sale of future royalties",
        "terseLabel": "Non-cash interest expense on liability related to the sale of future royalties",
        "verboseLabel": "Non-cash interest expense"
       }
      }
     },
     "localname": "NonCashInterestExpenseOnLiabilityRelatedToSaleOfFutureRoyalties",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_NonCashInterestExpenseOnLiabilityRelatedToSaleOfFutureRoyaltiesAndCapitalizedToPropertyPlantAndEquipment": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Non-cash interest expense on liability related to sale of future royalties and capitalized to property plant and equipment.",
        "label": "Non-Cash Interest Expense on Liability Related to Sale of Future Royalties and Capitalized to Property Plant and Equipment",
        "terseLabel": "Non-cash interest expense"
       }
      }
     },
     "localname": "NonCashInterestExpenseOnLiabilityRelatedToSaleOfFutureRoyaltiesAndCapitalizedToPropertyPlantAndEquipment",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_NonCashInterestExpenseOnLiabilityRelatedToTheSaleOfFutureRoyaltiesCapitalizedIntoEndingPropertyPlantAndEquipment": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Non-cash interest expense on liability related to the sale of future royalties capitalized into ending property, plant and equipment",
        "label": "Non-cash interest expense on liability related to the sale of future royalties capitalized into ending property, plant and equipment"
       }
      }
     },
     "localname": "NonCashInterestExpenseOnLiabilityRelatedToTheSaleOfFutureRoyaltiesCapitalizedIntoEndingPropertyPlantAndEquipment",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_OmersMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "OMERS [Member]",
        "label": "OMERS [Member]",
        "terseLabel": "OMERS"
       }
      }
     },
     "localname": "OmersMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_OpenMarketSaleMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Open market sale.",
        "label": "Open Market Sale [Member]",
        "terseLabel": "Open Market Sale"
       }
      }
     },
     "localname": "OpenMarketSaleMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_OperatingAndFinanceLeaseLiabilityCurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 3.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Operating and finance lease liability current.",
        "label": "Operating And Finance Lease Liability Current",
        "terseLabel": "Lease liabilities"
       }
      }
     },
     "localname": "OperatingAndFinanceLeaseLiabilityCurrent",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_OperatingAndFinanceLeaseLiabilityFromObtainingRightOfUseAssets": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Operating and finance lease liability from obtaining right of use assets.",
        "label": "Operating And Finance Lease Liability From Obtaining Right Of Use Assets",
        "terseLabel": "Acquired lease liabilities arising from obtaining right-of-use assets"
       }
      }
     },
     "localname": "OperatingAndFinanceLeaseLiabilityFromObtainingRightOfUseAssets",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_OperatingAndFinanceLeaseLiabilityNoncurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 3.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Operating and finance lease liability noncurrent.",
        "label": "Operating And Finance Lease Liability Noncurrent",
        "terseLabel": "Lease liabilities"
       }
      }
     },
     "localname": "OperatingAndFinanceLeaseLiabilityNoncurrent",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_OptionExtensionPremium": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Option extension premium.",
        "label": "Option Extension Premium",
        "terseLabel": "Option extension Premium"
       }
      }
     },
     "localname": "OptionExtensionPremium",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_OptionExtensionRightToAcquireSubjectToDescription": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Option extension right to acquire subject to description.",
        "label": "Option Extension Right To Acquire Subject To Description",
        "terseLabel": "Exercise of option extension, right to acquire condition"
       }
      }
     },
     "localname": "OptionExtensionRightToAcquireSubjectToDescription",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_OptionToSellCommonStockAggregateOfferingPrice": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Option to sell common stock aggregate offering price.",
        "label": "Option To Sell Common Stock Aggregate Offering Price",
        "terseLabel": "Option to sell common stock aggregate offering price"
       }
      }
     },
     "localname": "OptionToSellCommonStockAggregateOfferingPrice",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_OptionsToPurchaseCommonStockRestrictedStockUnitsAndPerformanceStockUnitsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Options to purchase common stock, restricted stock units and performance stock units.",
        "label": "Options To Purchase Common Stock Restricted Stock Units And Performance Stock Units [Member]",
        "terseLabel": "Options to Purchase Common Stock, RSUs, and PSUs",
        "verboseLabel": "Options to Purchase Common Stock, RSUs, and PSUs"
       }
      }
     },
     "localname": "OptionsToPurchaseCommonStockRestrictedStockUnitsAndPerformanceStockUnitsMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_OrganizationAndNatureOfBusinessLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Organization and nature of business.",
        "label": "Organization And Nature Of Business [Line Items]",
        "terseLabel": "Organization And Nature Of Business [Line Items]"
       }
      }
     },
     "localname": "OrganizationAndNatureOfBusinessLineItems",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_OrganizationAndNatureOfBusinessTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Organization and nature of business.",
        "label": "Organization And Nature Of Business [Table]",
        "terseLabel": "Organization And Nature Of Business [Table]"
       }
      }
     },
     "localname": "OrganizationAndNatureOfBusinessTable",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_OtherMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Other member.",
        "label": "Other Member",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "OtherMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_PaymentFromSaleOfFutureRoyalties": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Payment From Sale Of Future Royalties.",
        "label": "Payment From Sale Of Future Royalties",
        "terseLabel": "Payment from sale of future royalties"
       }
      }
     },
     "localname": "PaymentFromSaleOfFutureRoyalties",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_PaymentRequiredToRetainPRV": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Payment required to retain P R V.",
        "label": "Payment required to retain P R V"
       }
      }
     },
     "localname": "PaymentRequiredToRetainPRV",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_PaymentsMadeUnderAgreement": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Payments made under agreement.",
        "label": "Payments Made Under Agreement",
        "terseLabel": "Payments made under agreement"
       }
      }
     },
     "localname": "PaymentsMadeUnderAgreement",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_PclAndHek293PlatformsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "PCL and HEK293 Platforms.",
        "label": "PCL and HEK293 Platforms [Member]",
        "terseLabel": "PCL and HEK293 Platform"
       }
      }
     },
     "localname": "PclAndHek293PlatformsMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_PercentageOfCashValueOfConsiderationReceived": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of cash value of consideration received",
        "label": "Percentage of cash value of consideration received",
        "terseLabel": "Percentage of cash value of consideration"
       }
      }
     },
     "localname": "PercentageOfCashValueOfConsiderationReceived",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_PercentageOfGrossAccountsReceivableBalance": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of gross accounts receivable balance.",
        "label": "Percentage Of Gross Accounts Receivable Balance",
        "terseLabel": "Percentage of gross accounts receivable balance"
       }
      }
     },
     "localname": "PercentageOfGrossAccountsReceivableBalance",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_PercentageOfGrossAccountsReceivablesFromDifferentCustomer": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of gross accounts receivables from different customer.",
        "label": "Percentage Of Gross Accounts Receivables From Different Customer",
        "terseLabel": "Percentage of gross accounts receivable balance from different customer"
       }
      }
     },
     "localname": "PercentageOfGrossAccountsReceivablesFromDifferentCustomer",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_PercentageOfRightToReceiveRoyaltyPaymentsOnNetSales": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of right to receive royalty payments on net sales.",
        "label": "Percentage of right to receive royalty payments on net sales"
       }
      }
     },
     "localname": "PercentageOfRightToReceiveRoyaltyPaymentsOnNetSales",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_PremiumFromStockPurchaseAgreement": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Premium from stock purchase agreement.",
        "label": "Premium From Stock Purchase Agreement",
        "terseLabel": "Premium from stock purchase agreement"
       }
      }
     },
     "localname": "PremiumFromStockPurchaseAgreement",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_PriorityReviewVoucher": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Priority review voucher",
        "label": "Priority review voucher",
        "terseLabel": "Priority review voucher"
       }
      }
     },
     "localname": "PriorityReviewVoucher",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ProceedsFromIssuanceOfCommonStockAtMarketOffering": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Proceeds from issuance of common stock at market offering.",
        "label": "Proceeds From Issuance Of Common Stock At Market Offering",
        "terseLabel": "Proceeds from the issuance of common stock in connection with at-the-market offering, net",
        "verboseLabel": "Net proceeds from at-the-market offering"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfCommonStockAtMarketOffering",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ProceedsFromIssuanceOfCommonStockInConnectionWithLicenseAgreement": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Proceeds from issuance of common stock in connection with license agreement.",
        "label": "Proceeds From Issuance Of Common Stock In Connection With License Agreement",
        "terseLabel": "Proceeds from the issuance of common stock in connection with the license agreement, net",
        "verboseLabel": "Proceeds from issuance of common stock in connection with license agreement"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfCommonStockInConnectionWithLicenseAgreement",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ProceedsFromRoyaltiesReceivedFinancingActivities": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Proceeds from royalties received financing activities.",
        "label": "Proceeds From Royalties Received Financing Activities",
        "terseLabel": "Proceeds from the sale of future royalties, net"
       }
      }
     },
     "localname": "ProceedsFromRoyaltiesReceivedFinancingActivities",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ProceedsFromSaleOfFutureRoyalties": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Proceeds from sale of future royalties.",
        "label": "Proceeds From Sale Of Future Royalties",
        "terseLabel": "Proceeds from sale of future royalties"
       }
      }
     },
     "localname": "ProceedsFromSaleOfFutureRoyalties",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ProfitLossSharingPercentageOnCommercializingProducts": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Profit loss sharing percentage on commercializing products.",
        "label": "Profit Loss Sharing Percentage On Commercializing Products",
        "terseLabel": "Remaining profit or loss share percentage on commercializing products"
       }
      }
     },
     "localname": "ProfitLossSharingPercentageOnCommercializingProducts",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_ProfitLossSharingPercentageOnNetSales": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Profit loss sharing percentage on net sales.",
        "label": "Profit Loss Sharing Percentage On Net Sales",
        "terseLabel": "Profit loss sharing percentage on net sales"
       }
      }
     },
     "localname": "ProfitLossSharingPercentageOnNetSales",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_ProfitShareRevenueAndRoyaltiesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Profit share revenue and royalties.",
        "label": "Profit Share Revenue And Royalties [Member]",
        "terseLabel": "Profit Share Revenue"
       }
      }
     },
     "localname": "ProfitShareRevenueAndRoyaltiesMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_ProgramAgreementAndUnitholderOptionAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Program agreement and unitholder option agreement.",
        "label": "Program Agreement And Unitholder Option Agreement [Member]",
        "terseLabel": "Program Agreement and Unitholder Option Agreement"
       }
      }
     },
     "localname": "ProgramAgreementAndUnitholderOptionAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_RPIFinanceTrustMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "RPI Finance Trust.",
        "label": "R P I Finance Trust [Member]",
        "terseLabel": "RPI Finance Trust (RPI)"
       }
      }
     },
     "localname": "RPIFinanceTrustMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_ReceivableRelatedToLicenseAgreementCurrent": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Receivable related to license agreement current.",
        "label": "Receivable Related To License Agreement Current",
        "terseLabel": "Receivable related to Daiichi Sankyo license agreement"
       }
      }
     },
     "localname": "ReceivableRelatedToLicenseAgreementCurrent",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_RegeneronPharmaceuticalsIncMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Regeneron pharmaceuticals Inc.",
        "label": "Regeneron Pharmaceuticals Inc [Member]",
        "terseLabel": "Regeneron"
       }
      }
     },
     "localname": "RegeneronPharmaceuticalsIncMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_ResearchClinicalStudyAndManufacturingExpenses": {
     "auth_ref": [],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails": {
       "order": 0.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Research, clinical study, and manufacturing expenses.",
        "label": "Research Clinical Study And Manufacturing Expenses",
        "terseLabel": "Research, clinical study, and manufacturing expenses"
       }
      }
     },
     "localname": "ResearchClinicalStudyAndManufacturingExpenses",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_ResearchDevelopmentAndCommercializeAAVGeneTherapyProductsAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Research, development and commercialize AAV Gene therapy products agreement.",
        "label": "Research Development And Commercialize A A V Gene Therapy Products Agreement [Member]",
        "terseLabel": "Research, Develop and Commercialize AAV Gene Therapy Products"
       }
      }
     },
     "localname": "ResearchDevelopmentAndCommercializeAAVGeneTherapyProductsAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_ResearchGrantAgreementAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Research grant agreement.",
        "label": "Research Grant Agreement [Abstract]"
       }
      }
     },
     "localname": "ResearchGrantAgreementAbstract",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "xbrltype": "stringItemType"
    },
    "rare_RevenueSharePercentageOnCommercializedProductsRangeMidToHigh": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue share percentage on commercialized products range mid to high.",
        "label": "Revenue Share Percentage On Commercialized Products Range Mid To High",
        "terseLabel": "Tiered double-digit revenue share percentage entitled to receive"
       }
      }
     },
     "localname": "RevenueSharePercentageOnCommercializedProductsRangeMidToHigh",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_RoyaltiesTransactionCostsNet": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Royalties transaction costs net.",
        "label": "Royalties Transaction Costs Net",
        "terseLabel": "Royalties transaction costs net"
       }
      }
     },
     "localname": "RoyaltiesTransactionCostsNet",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_RoyaltyAgreementTerminationDescription": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Royalty agreement termination description.",
        "label": "Royalty Agreement Termination Description",
        "terseLabel": "Royalty payment termination description"
       }
      }
     },
     "localname": "RoyaltyAgreementTerminationDescription",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_RoyaltyAgreementTerminationThresholdAmount": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Royalty agreement termination threshold amount.",
        "label": "Royalty Agreement Termination Threshold Amount",
        "terseLabel": "Royalty agreement termination threshold amount"
       }
      }
     },
     "localname": "RoyaltyAgreementTerminationThresholdAmount",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_RoyaltyPercentageOnNetSales": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Royalty percentage on net sales.",
        "label": "Royalty Percentage On Net Sales",
        "terseLabel": "Percentage of royalty on net sales receives"
       }
      }
     },
     "localname": "RoyaltyPercentageOnNetSales",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "rare_RoyaltyPurchaseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Royalty purchase agreement.",
        "label": "Royalty Purchase Agreement [Member]",
        "terseLabel": "Royalty Purchase Agreement"
       }
      }
     },
     "localname": "RoyaltyPurchaseAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_ScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of activity within liability related to sale of future royalties.",
        "label": "Schedule Of Activity Within Liability Related To Sale Of Future Royalties Table [Text Block]",
        "terseLabel": "Schedule of Activity Within Liability Related to Sale of Future Royalties"
       }
      }
     },
     "localname": "ScheduleOfActivityWithinLiabilityRelatedToSaleOfFutureRoyaltiesTableTextBlock",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "rare_ScheduleOfChangesInFairValueOfEquityInvestmentTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of changes in fair value of equity investment.",
        "label": "Schedule Of Changes In Fair Value Of Equity Investment Table [Text Block]",
        "terseLabel": "Schedule of Changes in Fair Value of Equity Investment"
       }
      }
     },
     "localname": "ScheduleOfChangesInFairValueOfEquityInvestmentTableTextBlock",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "rare_ScheduleOfChangesInFairValueOfInvestmentInSecuritiesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of changes in fair value of investment in securities.",
        "label": "Schedule Of Changes In Fair Value Of Investment In Securities Table [Text Block]",
        "terseLabel": "Schedule of Changes in Fair Value of Investment in Securities"
       }
      }
     },
     "localname": "ScheduleOfChangesInFairValueOfInvestmentInSecuritiesTableTextBlock",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "rare_ScheduleOfCollaborationAndRoyaltyRevenueTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of collaboration and royalty revenue.",
        "label": "Schedule Of Collaboration And Royalty Revenue Table [Text Block]",
        "terseLabel": "Share of Collaboration and Royalty Revenue Related to Crysvita"
       }
      }
     },
     "localname": "ScheduleOfCollaborationAndRoyaltyRevenueTableTextBlock",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "rare_ScheduleOfCostSharingPaymentsTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of cost sharing payments.",
        "label": "Schedule Of Cost Sharing Payments Table [Text Block]",
        "terseLabel": "Schedule of Cost Sharing Payments"
       }
      }
     },
     "localname": "ScheduleOfCostSharingPaymentsTableTextBlock",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "rare_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesAvailableForGrantBeginningDate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share based compensation arrangement by share based payment award shares available for grant beginning date.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Shares Available For Grant Beginning Date",
        "terseLabel": "Automatic increases in shares available for grant effective date"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesAvailableForGrantBeginningDate",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "dateItemType"
    },
    "rare_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesAvailableForGrantEndingDate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share based compensation arrangement by share based payment award shares available for grant ending date.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Shares Available For Grant Ending Date",
        "terseLabel": "Shares available for grant, ending date"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesAvailableForGrantEndingDate",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "dateItemType"
    },
    "rare_SolidAndArcturusMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Solid and Arcturus.",
        "label": "Solid and Arcturus [Member]",
        "terseLabel": "Solid and Arcturus"
       }
      }
     },
     "localname": "SolidAndArcturusMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_SolidBiosciencesIncMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Solid Biosciences, Inc.",
        "label": "Solid Biosciences Inc [Member]",
        "terseLabel": "Solid Biosciences, Inc."
       }
      }
     },
     "localname": "SolidBiosciencesIncMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_StockIssuedDuringPeriodSharesAtMarketOffering": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stock issued during period shares at market offering.",
        "label": "Stock Issued During Period Shares At Market Offering",
        "terseLabel": "Issuance of common stock in connection with at-the-market offering, net of issuance costs, shares",
        "verboseLabel": "Stock sold in at-the-market offering"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesAtMarketOffering",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "sharesItemType"
    },
    "rare_StockIssuedDuringPeriodValueAtMarketOffering": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stock issued during period value at market offering.",
        "label": "Stock Issued During Period Value At Market Offering",
        "terseLabel": "Issuance of common stock in connection with at-the-market offering, net of issuance costs"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodValueAtMarketOffering",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_StockPurchaseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stock purchase agreement.",
        "label": "Stock Purchase Agreement [Member]",
        "terseLabel": "Stock Purchase Agreement"
       }
      }
     },
     "localname": "StockPurchaseAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_StockholdersEquityLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stockholders equity line items.",
        "label": "Stockholders Equity [Line Items]",
        "terseLabel": "Stockholders Equity [Line Items]"
       }
      }
     },
     "localname": "StockholdersEquityLineItems",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_StockholdersEquityTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stockholders equity table.",
        "label": "Stockholders Equity [Table]",
        "terseLabel": "Stockholders Equity [Table]"
       }
      }
     },
     "localname": "StockholdersEquityTable",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "rare_SublicenseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sublicense agreement.",
        "label": "Sublicense Agreement [Member]",
        "terseLabel": "Sublicense Agreement",
        "verboseLabel": "Sublicense Agreement"
       }
      }
     },
     "localname": "SublicenseAgreementMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_TimeDepositsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Time deposits.",
        "label": "Time Deposits [Member]",
        "terseLabel": "Time Deposits"
       }
      }
     },
     "localname": "TimeDepositsMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_TransactionPriceOfLicenseAgreement": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Transaction price of license agreement.",
        "label": "Transaction Price Of License Agreement",
        "terseLabel": "Transaction price of license agreement"
       }
      }
     },
     "localname": "TransactionPriceOfLicenseAgreement",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_TwoThousandFourteenEmployeeStockPurchasePlanMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Two thousand fourteen employee stock purchase plan.",
        "label": "Two Thousand Fourteen Employee Stock Purchase Plan [Member]",
        "terseLabel": "2014 Employee Stock Purchase Plan"
       }
      }
     },
     "localname": "TwoThousandFourteenEmployeeStockPurchasePlanMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_TwoThousandFourteenIncentivePlanMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "2014 Incentive plan.",
        "label": "Two Thousand Fourteen Incentive Plan [Member]",
        "terseLabel": "2014 Incentive Plan"
       }
      }
     },
     "localname": "TwoThousandFourteenIncentivePlanMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_USAndCanadaMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "U.S. and Canada.",
        "label": "U.S. and Canada [Member]"
       }
      }
     },
     "localname": "USAndCanadaMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_USGovernmentTreasuryAndAgencySecuritiesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "United states government treasury and agency securities.",
        "label": "U S Government Treasury And Agency Securities [Member]",
        "terseLabel": "U.S. Government Treasury and Agency Securities"
       }
      }
     },
     "localname": "USGovernmentTreasuryAndAgencySecuritiesMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_UnitedStatesAndCanadaMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "United States and Canada.",
        "label": "United States And Canada [Member]",
        "terseLabel": "Profit Share Territory"
       }
      }
     },
     "localname": "UnitedStatesAndCanadaMember",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "rare_UpfrontPaymentForInProcessResearchAndDevelopmentExpense": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Upfront payment for in process research and development expense.",
        "label": "Upfront Payment For In Process Research And Development Expense",
        "terseLabel": "Upfront payment for in-process research and development expense"
       }
      }
     },
     "localname": "UpfrontPaymentForInProcessResearchAndDevelopmentExpense",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "rare_UpfrontPaymentsOfCollaboration": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Upfront payments of collaboration.",
        "label": "Upfront Payments of Collaboration",
        "terseLabel": "Upfront payments of collaboration"
       }
      }
     },
     "localname": "UpfrontPaymentsOfCollaboration",
     "nsuri": "http://www.ultragenyx.com/20220630",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "srt_CounterpartyNameAxis": {
     "auth_ref": [
      "r44",
      "r46",
      "r97",
      "r98",
      "r212",
      "r219"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Counterparty Name [Axis]",
        "terseLabel": "Counterparty Name"
       }
      }
     },
     "localname": "CounterpartyNameAxis",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_EuropeMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Europe [Member]",
        "terseLabel": "Europe"
       }
      }
     },
     "localname": "EuropeMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_LatinAmericaMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Latin America [Member]",
        "terseLabel": "Latin America"
       }
      }
     },
     "localname": "LatinAmericaMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MaximumMember": {
     "auth_ref": [
      "r211",
      "r218",
      "r268",
      "r271",
      "r351",
      "r352",
      "r353",
      "r354",
      "r355",
      "r356",
      "r357",
      "r404",
      "r407",
      "r441",
      "r442"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Maximum [Member]",
        "terseLabel": "Maximum"
       }
      }
     },
     "localname": "MaximumMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MinimumMember": {
     "auth_ref": [
      "r211",
      "r218",
      "r268",
      "r271",
      "r351",
      "r352",
      "r353",
      "r354",
      "r355",
      "r356",
      "r357",
      "r404",
      "r407",
      "r441",
      "r442"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Minimum [Member]",
        "terseLabel": "Minimum"
       }
      }
     },
     "localname": "MinimumMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_NorthAmericaMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "North America [Member]",
        "terseLabel": "North America"
       }
      }
     },
     "localname": "NorthAmericaMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ProductOrServiceAxis": {
     "auth_ref": [
      "r146",
      "r245",
      "r249",
      "r359",
      "r403",
      "r405"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Product and Service [Axis]",
        "terseLabel": "Product and Service"
       }
      }
     },
     "localname": "ProductOrServiceAxis",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_ProductsAndServicesDomain": {
     "auth_ref": [
      "r146",
      "r245",
      "r249",
      "r359",
      "r403",
      "r405"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Product and Service [Domain]",
        "terseLabel": "Product and Service"
       }
      }
     },
     "localname": "ProductsAndServicesDomain",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RangeAxis": {
     "auth_ref": [
      "r211",
      "r218",
      "r257",
      "r268",
      "r271",
      "r351",
      "r352",
      "r353",
      "r354",
      "r355",
      "r356",
      "r357",
      "r404",
      "r407",
      "r441",
      "r442"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statistical Measurement [Axis]",
        "terseLabel": "Statistical Measurement"
       }
      }
     },
     "localname": "RangeAxis",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RangeMember": {
     "auth_ref": [
      "r211",
      "r218",
      "r257",
      "r268",
      "r271",
      "r351",
      "r352",
      "r353",
      "r354",
      "r355",
      "r356",
      "r357",
      "r404",
      "r407",
      "r441",
      "r442"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statistical Measurement [Domain]",
        "terseLabel": "Statistical Measurement"
       }
      }
     },
     "localname": "RangeMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RepurchaseAgreementCounterpartyNameDomain": {
     "auth_ref": [
      "r45",
      "r46",
      "r97",
      "r98",
      "r212",
      "r219"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Counterparty Name [Domain]",
        "terseLabel": "Counterparty Name"
       }
      }
     },
     "localname": "RepurchaseAgreementCounterpartyNameDomain",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ScenarioForecastMember": {
     "auth_ref": [
      "r108",
      "r269"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Forecast [Member]",
        "terseLabel": "Scenario Forecast"
       }
      }
     },
     "localname": "ScenarioForecastMember",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ScenarioUnspecifiedDomain": {
     "auth_ref": [
      "r108",
      "r112",
      "r269"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Scenario [Domain]",
        "terseLabel": "Scenario"
       }
      }
     },
     "localname": "ScenarioUnspecifiedDomain",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_SegmentGeographicalDomain": {
     "auth_ref": [
      "r147",
      "r148",
      "r245",
      "r250",
      "r406",
      "r432",
      "r433",
      "r434",
      "r435",
      "r436",
      "r437",
      "r438",
      "r439",
      "r440"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Geographical [Domain]",
        "terseLabel": "Geographical"
       }
      }
     },
     "localname": "SegmentGeographicalDomain",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_StatementGeographicalAxis": {
     "auth_ref": [
      "r147",
      "r148",
      "r245",
      "r250",
      "r406",
      "r429",
      "r432",
      "r433",
      "r434",
      "r435",
      "r436",
      "r437",
      "r438",
      "r439",
      "r440"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Geographical [Axis]",
        "terseLabel": "Geographical"
       }
      }
     },
     "localname": "StatementGeographicalAxis",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_StatementScenarioAxis": {
     "auth_ref": [
      "r108",
      "r112",
      "r199",
      "r269",
      "r346"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Scenario [Axis]",
        "terseLabel": "Scenario"
       }
      }
     },
     "localname": "StatementScenarioAxis",
     "nsuri": "http://fasb.org/srt/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountingPoliciesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Accounting Policies [Abstract]"
       }
      }
     },
     "localname": "AccountingPoliciesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountsPayableCurrent": {
     "auth_ref": [
      "r32",
      "r343"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 0.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accounts Payable, Current",
        "terseLabel": "Accounts payable",
        "totalLabel": "Accounts Payable, Current, Total"
       }
      }
     },
     "localname": "AccountsPayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsReceivableNet": {
     "auth_ref": [
      "r18",
      "r390",
      "r431"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business.",
        "label": "Accounts Receivable, after Allowance for Credit Loss",
        "terseLabel": "License agreement accounts receivable",
        "totalLabel": "Accounts Receivable, after Allowance for Credit Loss, Total"
       }
      }
     },
     "localname": "AccountsReceivableNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsReceivableNetCurrent": {
     "auth_ref": [
      "r4",
      "r18",
      "r150",
      "r151"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 2.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business, classified as current.",
        "label": "Accounts Receivable, after Allowance for Credit Loss, Current",
        "terseLabel": "Accounts receivable, net",
        "totalLabel": "Accounts Receivable, after Allowance for Credit Loss, Current, Total"
       }
      }
     },
     "localname": "AccountsReceivableNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments": {
     "auth_ref": [
      "r87"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The sum of the periodic adjustments of the differences between securities' face values and purchase prices that are charged against earnings. This is called accretion if the security was purchased at a discount and amortization if it was purchased at premium. As a noncash item, this element is an adjustment to net income when calculating cash provided by or used in operations using the indirect method.",
        "label": "Accretion (Amortization) of Discounts and Premiums, Investments",
        "negatedLabel": "Amortization of premium on marketable debt securities, net",
        "terseLabel": "Amortization of premium on marketable debt securities, net"
       }
      }
     },
     "localname": "AccretionAmortizationOfDiscountsAndPremiumsInvestments",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedLiabilitiesCurrent": {
     "auth_ref": [
      "r34"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred and payable, pertaining to costs that are statutory in nature, are incurred on contractual obligations, or accumulate over time and for which invoices have not yet been received or will not be rendered. Examples include taxes, interest, rent and utilities. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accrued Liabilities, Current",
        "terseLabel": "Accrued liabilities",
        "totalLabel": "Total accrued liabilities"
       }
      }
     },
     "localname": "AccruedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedLiabilitiesCurrentAndNoncurrent": {
     "auth_ref": [
      "r381",
      "r397"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred and payable, pertaining to costs that are statutory in nature, are incurred on contractual obligations, or accumulate over time and for which invoices have not yet been received or will not be rendered. Examples include taxes, interest, rent and utilities.",
        "label": "Accrued Liabilities",
        "terseLabel": "License agreement accrued liabilities",
        "totalLabel": "Accrued Liabilities, Total"
       }
      }
     },
     "localname": "AccruedLiabilitiesCurrentAndNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax": {
     "auth_ref": [
      "r53"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveIncomeScheduleOfTotalAccumulatedOtherComprehensiveLossDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after tax, of accumulated unrealized gain (loss) on investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "AOCI, Debt Securities, Available-for-sale, Adjustment, after Tax",
        "terseLabel": "Unrealized loss on available-for-sale securities",
        "totalLabel": "AOCI, Debt Securities, Available-for-sale, Adjustment, after Tax, Total"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveIncomeScheduleOfTotalAccumulatedOtherComprehensiveLossDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax": {
     "auth_ref": [
      "r48",
      "r52",
      "r53",
      "r54",
      "r320"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveIncomeScheduleOfTotalAccumulatedOtherComprehensiveLossDetails": {
       "order": 0.0,
       "parentTag": "us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accumulated adjustment, net of tax, that results from the process of translating subsidiary financial statements and foreign equity investments into the reporting currency from the functional currency of the reporting entity, net of reclassification of realized foreign currency translation gains or losses.",
        "label": "Accumulated Other Comprehensive Income (Loss), Foreign Currency Translation Adjustment, Net of Tax",
        "periodEndLabel": "Accumulated Other Comprehensive Income (Loss), Foreign Currency Translation Adjustment, Net of Tax, Ending Balance",
        "periodStartLabel": "Accumulated Other Comprehensive Income (Loss), Foreign Currency Translation Adjustment, Net of Tax, Beginning Balance",
        "terseLabel": "Foreign currency translation adjustments"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveIncomeScheduleOfTotalAccumulatedOtherComprehensiveLossDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax": {
     "auth_ref": [
      "r21",
      "r52",
      "r53",
      "r54",
      "r393",
      "r412",
      "r413"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveIncomeScheduleOfTotalAccumulatedOtherComprehensiveLossDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 3.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accumulated change in equity from transactions and other events and circumstances from non-owner sources, net of tax effect, at period end. Excludes Net Income (Loss), and accumulated changes in equity from transactions resulting from investments by owners and distributions to owners. Includes foreign currency translation items, certain pension adjustments, unrealized gains and losses on certain investments in debt and equity securities, other than temporary impairment (OTTI) losses related to factors other than credit losses on available-for-sale and held-to-maturity debt securities that an entity does not intend to sell and it is not more likely than not that the entity will be required to sell before recovery of the amortized cost basis, as well as changes in the fair value of derivatives related to the effective portion of a designated cash flow hedge.",
        "label": "Accumulated Other Comprehensive Income (Loss), Net of Tax",
        "terseLabel": "Accumulated other comprehensive loss",
        "totalLabel": "Total accumulated other comprehensive loss"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveIncomeScheduleOfTotalAccumulatedOtherComprehensiveLossDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Accumulated Other Comprehensive Income (Loss), Net of Tax [Abstract]"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossNetOfTaxAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeMember": {
     "auth_ref": [
      "r51",
      "r54",
      "r61",
      "r62",
      "r63",
      "r100",
      "r101",
      "r102",
      "r307",
      "r408",
      "r409",
      "r450"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accumulated increase (decrease) in equity from transactions and other events and circumstances from non-owner sources, attributable to the parent. Excludes net income (loss), and accumulated changes in equity from transactions resulting from investments by owners and distributions to owners.",
        "label": "AOCI Attributable to Parent [Member]",
        "terseLabel": "Accumulated Other Comprehensive Income (Loss)"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AcquisitionCosts": {
     "auth_ref": [
      "r361",
      "r362"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The capitalized costs incurred during the period (excluded from amortization) to purchase, lease or otherwise acquire an unproved property, including costs of lease bonuses and options to purchase or lease properties, the portion of costs applicable to minerals when land including mineral rights is purchased in fee, brokers' fees, recording fees, legal costs, and other costs incurred in acquiring properties.",
        "label": "Acquisition Costs, Period Cost",
        "terseLabel": "Acquisition cost"
       }
      }
     },
     "localname": "AcquisitionCosts",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdditionalPaidInCapital": {
     "auth_ref": [
      "r19",
      "r282",
      "r343"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 2.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of excess of issue price over par or stated value of stock and from other transaction involving stock or stockholder. Includes, but is not limited to, additional paid-in capital (APIC) for common and preferred stock.",
        "label": "Additional Paid in Capital",
        "periodEndLabel": "Additional Paid in Capital, Ending Balance",
        "periodStartLabel": "Additional Paid in Capital, Beginning Balance",
        "terseLabel": "Additional paid-in capital",
        "totalLabel": "Additional Paid in Capital, Total"
       }
      }
     },
     "localname": "AdditionalPaidInCapital",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdditionalPaidInCapitalMember": {
     "auth_ref": [
      "r100",
      "r101",
      "r102",
      "r279",
      "r280",
      "r281",
      "r312"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Excess of issue price over par or stated value of the entity's capital stock and amounts received from other transactions involving the entity's stock or stockholders.",
        "label": "Additional Paid-in Capital [Member]",
        "terseLabel": "Additional Paid-in Capital"
       }
      }
     },
     "localname": "AdditionalPaidInCapitalMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue": {
     "auth_ref": [
      "r272",
      "r273",
      "r284",
      "r285"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase to additional paid-in capital (APIC) for recognition of cost for award under share-based payment arrangement.",
        "label": "APIC, Share-based Payment Arrangement, Increase for Cost Recognition",
        "terseLabel": "Stock-based compensation",
        "totalLabel": "APIC, Share-based Payment Arrangement, Increase for Cost Recognition, Total"
       }
      }
     },
     "localname": "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Adjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract]",
        "terseLabel": "Adjustments to reconcile net loss to net cash used in operating activities:"
       }
      }
     },
     "localname": "AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AllocatedShareBasedCompensationExpense": {
     "auth_ref": [
      "r273",
      "r276",
      "r283"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expense for award under share-based payment arrangement. Excludes amount capitalized.",
        "label": "Share-based Payment Arrangement, Expense",
        "verboseLabel": "Stock-based compensation expense"
       }
      }
     },
     "localname": "AllocatedShareBasedCompensationExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AmortizationOfIntangibleAssets": {
     "auth_ref": [
      "r86",
      "r193",
      "r195"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate expense charged against earnings to allocate the cost of intangible assets (nonphysical assets not used in production) in a systematic and rational manner to the periods expected to benefit from such assets. As a noncash expense, this element is added back to net income when calculating cash provided by or used in operations using the indirect method.",
        "label": "Amortization of Intangible Assets",
        "terseLabel": "Costs of goods sold related to amortization of intangible asset",
        "totalLabel": "Amortization of Intangible Assets, Total"
       }
      }
     },
     "localname": "AmortizationOfIntangibleAssets",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount": {
     "auth_ref": [
      "r115"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) or earnings per unit (EPU) in the future that were not included in the computation of diluted EPS or EPU because to do so would increase EPS or EPU amounts or decrease loss per share or unit amounts for the period presented.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount",
        "terseLabel": "Common stock equivalents excluded from computation of diluted net loss per share"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis": {
     "auth_ref": [
      "r115"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of antidilutive security.",
        "label": "Antidilutive Securities [Axis]",
        "terseLabel": "Antidilutive Securities"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]",
        "terseLabel": "Antidilutive Securities Excluded From Computation Of Earnings Per Share [Line Items]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesNameDomain": {
     "auth_ref": [
      "r115"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Incremental common shares attributable to securities that were not included in diluted earnings per share (EPS) because to do so would increase EPS amounts or decrease loss per share amounts for the period presented.",
        "label": "Antidilutive Securities, Name [Domain]",
        "terseLabel": "Antidilutive Securities, Name"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ArrangementsAndNonarrangementTransactionsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Domain]",
        "terseLabel": "Collaborative Arrangement and Arrangement Other than Collaborative"
       }
      }
     },
     "localname": "ArrangementsAndNonarrangementTransactionsMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AssetBackedSecuritiesMember": {
     "auth_ref": [
      "r162",
      "r258"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Securities that are primarily serviced by the cash flows of a discrete pool of receivables or other financial assets for example, but not limited to, credit card receivables, car loans, recreational vehicle loans, and mobile home loans.",
        "label": "Asset-backed Securities [Member]",
        "terseLabel": "Asset-backed Securities"
       }
      }
     },
     "localname": "AssetBackedSecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_Assets": {
     "auth_ref": [
      "r95",
      "r135",
      "r138",
      "r144",
      "r169",
      "r200",
      "r201",
      "r202",
      "r203",
      "r204",
      "r205",
      "r206",
      "r207",
      "r208",
      "r209",
      "r210",
      "r305",
      "r308",
      "r321",
      "r341",
      "r343",
      "r378",
      "r391"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are recognized. Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets",
        "totalLabel": "Total assets"
       }
      }
     },
     "localname": "Assets",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Assets [Abstract]",
        "terseLabel": "Assets"
       }
      }
     },
     "localname": "AssetsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AssetsCurrent": {
     "auth_ref": [
      "r5",
      "r6",
      "r43",
      "r95",
      "r169",
      "r200",
      "r201",
      "r202",
      "r203",
      "r204",
      "r205",
      "r206",
      "r207",
      "r208",
      "r209",
      "r210",
      "r305",
      "r308",
      "r321",
      "r341",
      "r343"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 0.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are expected to be realized in cash, sold, or consumed within one year (or the normal operating cycle, if longer). Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets, Current",
        "totalLabel": "Total current assets"
       }
      }
     },
     "localname": "AssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Assets, Current [Abstract]",
        "terseLabel": "Current assets:"
       }
      }
     },
     "localname": "AssetsCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax": {
     "auth_ref": [
      "r158"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, before tax, of unrealized gain in accumulated other comprehensive income (AOCI) on investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-sale, Accumulated Gross Unrealized Gain, before Tax",
        "terseLabel": "Gross Unrealized Gains"
       }
      }
     },
     "localname": "AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax": {
     "auth_ref": [
      "r159"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, before tax, of unrealized loss in accumulated other comprehensive income (AOCI) on investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-sale, Accumulated Gross Unrealized Loss, before Tax",
        "negatedLabel": "Gross unrealized losses"
       }
      }
     },
     "localname": "AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis": {
     "auth_ref": [
      "r156",
      "r185"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amortized cost of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-sale, Amortized Cost",
        "terseLabel": "Amortized Cost",
        "totalLabel": "Amortized Cost"
       }
      }
     },
     "localname": "AvailableForSaleDebtSecuritiesAmortizedCostBasis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtSecurities": {
     "auth_ref": [
      "r153",
      "r157",
      "r185",
      "r380"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-sale",
        "terseLabel": "Estimated Fair Value",
        "totalLabel": "Debt Securities, Available-for-sale, Total"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtSecurities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtSecuritiesCurrent": {
     "auth_ref": [
      "r155",
      "r185"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 1.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale), classified as current.",
        "label": "Debt Securities, Available-for-sale, Current",
        "terseLabel": "Marketable debt securities",
        "totalLabel": "Debt Securities, Available-for-sale, Current, Total"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtSecuritiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtSecuritiesNoncurrent": {
     "auth_ref": [
      "r155",
      "r185"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 3.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale), classified as noncurrent.",
        "label": "Debt Securities, Available-for-sale, Noncurrent",
        "terseLabel": "Marketable debt securities"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtSecuritiesNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of available-for-sale securities which includes, but is not limited to, changes in the cost basis and fair value, fair value and gross unrealized gain (loss), fair values by type of security, contractual maturity and classification, amortized cost basis, contracts to acquire securities to be accounted for as available-for-sale, debt maturities, transfers to trading, change in net unrealized holding gain (loss) net of tax, continuous unrealized loss position fair value, aggregate losses qualitative disclosures, other than temporary impairment (OTTI) losses or other disclosures related to available for sale securities.",
        "label": "Available-for-sale Securities [Table Text Block]",
        "terseLabel": "Summary of Cash Equivalents and Investments Classified as Available For Sale Securities"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_BalanceSheetLocationAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by location on balance sheet (statement of financial position).",
        "label": "Balance Sheet Location [Axis]",
        "terseLabel": "Balance Sheet Location"
       }
      }
     },
     "localname": "BalanceSheetLocationAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BalanceSheetLocationDomain": {
     "auth_ref": [
      "r310",
      "r311"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Location in the balance sheet (statement of financial position).",
        "label": "Balance Sheet Location [Domain]",
        "terseLabel": "Balance Sheet Location"
       }
      }
     },
     "localname": "BalanceSheetLocationDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_BasisOfAccountingPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for basis of accounting, or basis of presentation, used to prepare the financial statements (for example, US Generally Accepted Accounting Principles, Other Comprehensive Basis of Accounting, IFRS).",
        "label": "Basis of Accounting, Policy [Policy Text Block]",
        "terseLabel": "Basis of Presentation"
       }
      }
     },
     "localname": "BasisOfAccountingPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_BusinessAcquisitionAcquireeDomain": {
     "auth_ref": [
      "r267",
      "r270"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Identification of the acquiree in a material business combination (or series of individually immaterial business combinations), which may include the name or other type of identification of the acquiree.",
        "label": "Business Acquisition, Acquiree [Domain]"
       }
      }
     },
     "localname": "BusinessAcquisitionAcquireeDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_BusinessAcquisitionAxis": {
     "auth_ref": [
      "r267",
      "r270",
      "r297",
      "r298"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by business combination or series of individually immaterial business combinations.",
        "label": "Business Acquisition [Axis]"
       }
      }
     },
     "localname": "BusinessAcquisitionAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BusinessCombinationConsiderationTransferred1": {
     "auth_ref": [
      "r299",
      "r300",
      "r301"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of consideration transferred, consisting of acquisition-date fair value of assets transferred by the acquirer, liabilities incurred by the acquirer, and equity interest issued by the acquirer.",
        "label": "Business Combination, Consideration Transferred",
        "terseLabel": "Business acquisition, consideration transferred",
        "totalLabel": "Business Combination, Consideration Transferred, Total"
       }
      }
     },
     "localname": "BusinessCombinationConsiderationTransferred1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsAtCarryingValue": {
     "auth_ref": [
      "r2",
      "r30",
      "r88"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails": {
       "order": 0.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations",
       "weight": 1.0
      },
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 0.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates. Excludes cash and cash equivalents within disposal group and discontinued operation.",
        "label": "Cash and Cash Equivalents, at Carrying Value",
        "periodEndLabel": "Cash and Cash Equivalents, at Carrying Value, Ending Balance",
        "periodStartLabel": "Cash and Cash Equivalents, at Carrying Value, Beginning Balance",
        "terseLabel": "Cash and cash equivalents",
        "totalLabel": "Cash and Cash Equivalents, at Carrying Value, Total"
       }
      }
     },
     "localname": "CashAndCashEquivalentsAtCarryingValue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsRestrictedCashAndCashEquivalentsPolicy": {
     "auth_ref": [
      "r12",
      "r89",
      "r376"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Entity's cash and cash equivalents accounting policy with respect to restricted balances.  Restrictions may include legally restricted deposits held as compensating balances against short-term borrowing arrangements, contracts entered into with others, or company statements of intention with regard to particular deposits; however, time deposits and short-term certificates of deposit are not generally included in legally restricted deposits.",
        "label": "Cash and Cash Equivalents, Restricted Cash and Cash Equivalents, Policy [Policy Text Block]",
        "terseLabel": "Cash, Cash Equivalents, and Restricted Cash"
       }
      }
     },
     "localname": "CashAndCashEquivalentsRestrictedCashAndCashEquivalentsPolicy",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations": {
     "auth_ref": [
      "r83",
      "r88",
      "r90"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash and cash equivalents, and cash and cash equivalents restricted to withdrawal or usage; including, but not limited to, disposal group and discontinued operations. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Including Disposal Group and Discontinued Operations",
        "periodEndLabel": "Cash, cash equivalents and restricted cash at end of period",
        "periodStartLabel": "Cash, cash equivalents and restricted cash at beginning of period",
        "totalLabel": "Total cash, cash equivalents, and restricted cash shown in the statements of cash flows"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect": {
     "auth_ref": [
      "r83",
      "r325"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in cash, cash equivalents, and cash and cash equivalents restricted to withdrawal or usage; including effect from exchange rate change. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Period Increase (Decrease), Including Exchange Rate Effect",
        "totalLabel": "Net decrease in cash, cash equivalents and restricted cash"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashFlowNoncashInvestingAndFinancingActivitiesDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Cash Flow, Noncash Investing and Financing Activities Disclosure [Abstract]",
        "terseLabel": "Supplemental disclosures of non-cash information:"
       }
      }
     },
     "localname": "CashFlowNoncashInvestingAndFinancingActivitiesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Line Items]",
        "terseLabel": "Collaborative Arrangements And Noncollaborative Arrangement Transactions [Line Items]"
       }
      }
     },
     "localname": "CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CommercialPaperNotIncludedWithCashAndCashEquivalentsMember": {
     "auth_ref": [
      "r258",
      "r318"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Unsecured promissory note (generally negotiable) that provides institutions with short-term funds that is excluded from cash and cash equivalents.",
        "label": "Commercial Paper, Not Included with Cash and Cash Equivalents [Member]",
        "terseLabel": "Commercial Paper"
       }
      }
     },
     "localname": "CommercialPaperNotIncludedWithCashAndCashEquivalentsMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommonStockMember": {
     "auth_ref": [
      "r100",
      "r101",
      "r312"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stock that is subordinate to all other stock of the issuer.",
        "label": "Common Stock [Member]",
        "terseLabel": "Common Stock"
       }
      }
     },
     "localname": "CommonStockMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommonStockSharesAuthorized": {
     "auth_ref": [
      "r17"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The maximum number of common shares permitted to be issued by an entity's charter and bylaws.",
        "label": "Common Stock, Shares Authorized",
        "terseLabel": "Common stock, shares authorized"
       }
      }
     },
     "localname": "CommonStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesIssued": {
     "auth_ref": [
      "r17"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total number of common shares of an entity that have been sold or granted to shareholders (includes common shares that were issued, repurchased and remain in the treasury). These shares represent capital invested by the firm's shareholders and owners, and may be all or only a portion of the number of shares authorized. Shares issued include shares outstanding and shares held in the treasury.",
        "label": "Common Stock, Shares, Issued",
        "terseLabel": "Common stock, shares issued",
        "totalLabel": "Common Stock, Shares, Issued, Total"
       }
      }
     },
     "localname": "CommonStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesOutstanding": {
     "auth_ref": [
      "r17",
      "r231"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares of common stock outstanding. Common stock represent the ownership interest in a corporation.",
        "label": "Common Stock, Shares, Outstanding",
        "periodEndLabel": "Ending balance, shares",
        "periodStartLabel": "Beginning balance, shares",
        "terseLabel": "Common stock, shares outstanding"
       }
      }
     },
     "localname": "CommonStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockValue": {
     "auth_ref": [
      "r17",
      "r343"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 1.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable common stock (or common stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable common shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Common Stock, Value, Issued",
        "periodEndLabel": "Common Stock, Value, Issued, Ending Balance",
        "periodStartLabel": "Common Stock, Value, Issued, Beginning Balance",
        "terseLabel": "Common stock - 250,000,000 shares authorized; 70,010,398 and 69,344,998 shares issued and outstanding as of June 30, 2022 and December 31, 2021, respectively",
        "totalLabel": "Common Stock, Value, Issued, Total",
        "verboseLabel": "Common stock investment value"
       }
      }
     },
     "localname": "CommonStockValue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ComprehensiveIncomeNetOfTax": {
     "auth_ref": [
      "r57",
      "r59",
      "r60",
      "r69",
      "r385",
      "r400"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after tax of increase (decrease) in equity from transactions and other events and circumstances from net income and other comprehensive income, attributable to parent entity. Excludes changes in equity resulting from investments by owners and distributions to owners.",
        "label": "Comprehensive Income (Loss), Net of Tax, Attributable to Parent",
        "totalLabel": "Total comprehensive loss"
       }
      }
     },
     "localname": "ComprehensiveIncomeNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ComprehensiveIncomeNoteTextBlock": {
     "auth_ref": [
      "r68",
      "r73",
      "r384",
      "r399"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for comprehensive income, which includes, but is not limited to, 1) the amount of income tax expense or benefit allocated to each component of other comprehensive income, including reclassification adjustments, 2) the reclassification adjustments for each classification of other comprehensive income and 3) the ending accumulated balances for each component of comprehensive income.",
        "label": "Comprehensive Income (Loss) Note [Text Block]",
        "terseLabel": "Accumulated Other Comprehensive Loss"
       }
      }
     },
     "localname": "ComprehensiveIncomeNoteTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLoss"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ContractWithCustomerAssetAndLiabilityTableTextBlock": {
     "auth_ref": [
      "r236"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of receivable, contract asset, and contract liability from contract with customer. Includes, but is not limited to, change in contract asset and contract liability.",
        "label": "Contract with Customer, Contract Asset, Contract Liability, and Receivable [Table Text Block]",
        "terseLabel": "Summary of Changes in Contract Liabilities"
       }
      }
     },
     "localname": "ContractWithCustomerAssetAndLiabilityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ContractWithCustomerLiability": {
     "auth_ref": [
      "r234",
      "r235",
      "r246"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable.",
        "label": "Contract with Customer, Liability",
        "terseLabel": "Deferred revenue",
        "totalLabel": "Contract with Customer, Liability, Total"
       }
      }
     },
     "localname": "ContractWithCustomerLiability",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityCurrent": {
     "auth_ref": [
      "r234",
      "r235",
      "r246"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable, classified as current.",
        "label": "Contract with Customer, Liability, Current",
        "negatedPeriodEndLabel": "Balance of contract liabilities at end of period",
        "negatedPeriodStartLabel": "Balance of contract liabilities at beginning of period",
        "periodEndLabel": "Balance of contract liabilities at end of period",
        "periodStartLabel": "Balance of contract liabilities at beginning of period"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureRevenueSummaryOfChangesInContractLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityRevenueRecognized": {
     "auth_ref": [
      "r247"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue recognized that was previously included in balance of obligation to transfer good or service to customer for which consideration from customer has been received or is due.",
        "label": "Contract with Customer, Liability, Revenue Recognized",
        "terseLabel": "Revenue recognized"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityRevenueRecognized",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CorporateBondSecuritiesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This category includes information about long-term debt securities that are issued by either a domestic or foreign corporate business entity with a date certain promise of repayment and a return to the holder for the time value of money (for example, variable or fixed interest, original issue discount).",
        "label": "Corporate Bond Securities [Member]",
        "terseLabel": "Corporate Bond Securities",
        "verboseLabel": "Corporate Bonds"
       }
      }
     },
     "localname": "CorporateBondSecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CostOfSalesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Primary financial statement caption encompassing cost of sales.",
        "label": "Cost of Sales [Member]",
        "terseLabel": "Cost of sales"
       }
      }
     },
     "localname": "CostOfSalesMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CreditLossFinancialInstrumentPolicyTextBlock": {
     "auth_ref": [
      "r171",
      "r172",
      "r173",
      "r174",
      "r175",
      "r176",
      "r177",
      "r178",
      "r179",
      "r180",
      "r181",
      "r182",
      "r183",
      "r184",
      "r186",
      "r187",
      "r188",
      "r189"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for credit loss on financial instrument measured at amortized cost basis, net investment in lease, off-balance sheet credit exposure, and available-for-sale debt security. Includes, but is not limited to, methodology used to estimate allowance for credit loss, how writeoff of uncollectible amount is recognized, and determination of past due status and nonaccrual status.",
        "label": "Credit Loss, Financial Instrument [Policy Text Block]",
        "terseLabel": "Credit Losses"
       }
      }
     },
     "localname": "CreditLossFinancialInstrumentPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DebtInstrumentInterestRateEffectivePercentage": {
     "auth_ref": [
      "r36",
      "r214",
      "r335",
      "r336"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Effective interest rate for the funds borrowed under the debt agreement considering interest compounding and original issue discount or premium.",
        "label": "Debt Instrument, Interest Rate, Effective Percentage",
        "terseLabel": "Effective annual interest rate"
       }
      }
     },
     "localname": "DebtInstrumentInterestRateEffectivePercentage",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DebtSecuritiesAvailableForSaleTable": {
     "auth_ref": [
      "r167"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-sale [Table]",
        "terseLabel": "Debt Securities Available For Sale [Table]"
       }
      }
     },
     "localname": "DebtSecuritiesAvailableForSaleTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtSecuritiesAvailableForSaleTableTextBlock": {
     "auth_ref": [
      "r167"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-sale [Table Text Block]",
        "terseLabel": "Summary of Cash Equivalents and Investments Classified as Available For Sale Securities"
       }
      }
     },
     "localname": "DebtSecuritiesAvailableForSaleTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DeferredIncomeTaxLiabilitiesNet": {
     "auth_ref": [
      "r290",
      "r291"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 4.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences with jurisdictional netting.",
        "label": "Deferred Income Tax Liabilities, Net",
        "terseLabel": "Deferred tax liabilities",
        "totalLabel": "Deferred Income Tax Liabilities, Net, Total"
       }
      }
     },
     "localname": "DeferredIncomeTaxLiabilitiesNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredRevenueDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Deferred Revenue Disclosure [Abstract]"
       }
      }
     },
     "localname": "DeferredRevenueDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_DeferredRevenueRevenueRecognized1": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue recognized that was previously reported as deferred or unearned revenue.",
        "label": "Deferred Revenue, Revenue Recognized",
        "terseLabel": "Revenue recognized"
       }
      }
     },
     "localname": "DeferredRevenueRevenueRecognized1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DepreciationDepletionAndAmortization": {
     "auth_ref": [
      "r86",
      "r133"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate expense recognized in the current period that allocates the cost of tangible assets, intangible assets, or depleting assets to periods that benefit from use of the assets.",
        "label": "Depreciation, Depletion and Amortization",
        "terseLabel": "Depreciation and amortization",
        "totalLabel": "Depreciation, Depletion and Amortization, Total"
       }
      }
     },
     "localname": "DepreciationDepletionAndAmortization",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DevelopmentCosts": {
     "auth_ref": [
      "r362"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The capitalized costs incurred during the period (excluded from amortization) to obtain access to proved reserves and to provide facilities for extracting, treating, gathering and storing the oil and gas.",
        "label": "Development Costs, Period Cost",
        "terseLabel": "Development costs"
       }
      }
     },
     "localname": "DevelopmentCosts",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DisaggregationOfRevenueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Disaggregation of Revenue [Abstract]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Disaggregation of Revenue [Line Items]",
        "terseLabel": "Disaggregation Of Revenue [Line Items]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTable": {
     "auth_ref": [
      "r245",
      "r249",
      "r250",
      "r251",
      "r252",
      "r253",
      "r254",
      "r255"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table]",
        "terseLabel": "Disaggregation Of Revenue [Table]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTableTextBlock": {
     "auth_ref": [
      "r245"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table Text Block]",
        "terseLabel": "Summary of Disaggregation of Total Revenues"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock": {
     "auth_ref": [
      "r286"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for share-based payment arrangement.",
        "label": "Share-based Payment Arrangement [Text Block]",
        "terseLabel": "Stock-Based Awards"
       }
      }
     },
     "localname": "DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwards"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureOfCompensationRelatedCostsSharebasedPaymentsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Share-based Payment Arrangement [Abstract]"
       }
      }
     },
     "localname": "DisclosureOfCompensationRelatedCostsSharebasedPaymentsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Earnings Per Share [Abstract]",
        "terseLabel": "Net income (loss) per share:"
       }
      }
     },
     "localname": "EarningsPerShareAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareBasicAndDiluted": {
     "auth_ref": [
      "r114"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of net income or loss for the period per each share in instances when basic and diluted earnings per share are the same amount and reported as a single line item on the face of the financial statements.  Basic earnings per share is the amount of net income or loss for the period per each share of common stock or unit outstanding during the reporting period.  Diluted earnings per share includes the amount of net income or loss for the period available to each share of common stock or common unit outstanding during the reporting period and to each share or unit that would have been outstanding assuming the issuance of common shares or units for all dilutive potential common shares or units outstanding during the reporting period.",
        "label": "Earnings Per Share, Basic and Diluted",
        "terseLabel": "Net loss per share, basic and diluted",
        "totalLabel": "Earnings Per Share, Basic and Diluted, Total"
       }
      }
     },
     "localname": "EarningsPerShareBasicAndDiluted",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareTextBlock": {
     "auth_ref": [
      "r115",
      "r116",
      "r117",
      "r118"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for earnings per share.",
        "label": "Earnings Per Share [Text Block]",
        "terseLabel": "Net Loss Per Share"
       }
      }
     },
     "localname": "EarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShare1"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations": {
     "auth_ref": [
      "r325"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 3.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) from effect of exchange rate changes on cash and cash equivalents, and cash and cash equivalents restricted to withdrawal or usage; held in foreign currencies; including, but not limited to, disposal group and discontinued operations. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Effect of Exchange Rate on Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Including Disposal Group and Discontinued Operations",
        "terseLabel": "Effect of exchange rate changes on cash",
        "totalLabel": "Effect of Exchange Rate on Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Including Disposal Group and Discontinued Operations, Total"
       }
      }
     },
     "localname": "EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeRelatedLiabilitiesCurrent": {
     "auth_ref": [
      "r34"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total of the carrying values as of the balance sheet date of obligations incurred through that date and payable for obligations related to services received from employees, such as accrued salaries and bonuses, payroll taxes and fringe benefits. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Employee-related Liabilities, Current",
        "terseLabel": "Payroll and related expenses",
        "totalLabel": "Employee-related Liabilities, Current, Total"
       }
      }
     },
     "localname": "EmployeeRelatedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Share-based Payment Arrangement, Expensed and Capitalized, Amount [Line Items]",
        "terseLabel": "Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items]"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EmployeeStockMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "An Employee Stock Purchase Plan is a tax-efficient means by which employees of a corporation can purchase the corporation's stock.",
        "label": "Employee Stock [Member]",
        "terseLabel": "Employee Stock Purchase Plan"
       }
      }
     },
     "localname": "EmployeeStockMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Equity [Abstract]"
       }
      }
     },
     "localname": "EquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EquityComponentDomain": {
     "auth_ref": [
      "r0",
      "r61",
      "r62",
      "r63",
      "r100",
      "r101",
      "r102",
      "r104",
      "r109",
      "r111",
      "r119",
      "r170",
      "r231",
      "r232",
      "r279",
      "r280",
      "r281",
      "r293",
      "r294",
      "r312",
      "r327",
      "r328",
      "r329",
      "r330",
      "r331",
      "r333",
      "r408",
      "r409",
      "r410",
      "r450"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Components of equity are the parts of the total Equity balance including that which is allocated to common, preferred, treasury stock, retained earnings, etc.",
        "label": "Equity Component [Domain]",
        "terseLabel": "Equity Component"
       }
      }
     },
     "localname": "EquityComponentDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquitySecuritiesFvNiGainLoss": {
     "auth_ref": [
      "r168"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      },
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of unrealized and realized gain (loss) on investment in equity security measured at fair value with change in fair value recognized in net income (FV-NI).",
        "label": "Equity Securities, FV-NI, Gain (Loss)",
        "negatedLabel": "Change in fair value of equity investments",
        "terseLabel": "Change in fair value of equity investments",
        "totalLabel": "Equity Securities, FV-NI, Gain (Loss), Total"
       }
      }
     },
     "localname": "EquitySecuritiesFvNiGainLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Abstract]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]",
        "terseLabel": "Fair Value Assets And Liabilities Measured On Recurring And Nonrecurring Basis [Line Items]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable": {
     "auth_ref": [
      "r314",
      "r315",
      "r316",
      "r319"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about asset and liability measured at fair value on recurring and nonrecurring basis.",
        "label": "Fair Value, Recurring and Nonrecurring [Table]",
        "terseLabel": "Fair Value Assets And Liabilities Measured On Recurring And Nonrecurring Basis [Table]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisTextBlock": {
     "auth_ref": [
      "r314",
      "r315"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of assets, including [financial] instruments measured at fair value that are classified in stockholders' equity, if any, by class that are measured at fair value on a recurring basis. The disclosures contemplated herein include the fair value measurements at the reporting date by the level within the fair value hierarchy in which the fair value measurements in their entirety fall, segregating fair value measurements using quoted prices in active markets for identical assets (Level 1), significant other observable inputs (Level 2), and significant unobservable inputs (Level 3).",
        "label": "Fair Value, Assets Measured on Recurring Basis [Table Text Block]",
        "terseLabel": "Summary of Financial Assets Measured on Recurring Basis"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain": {
     "auth_ref": [
      "r317"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Class of asset.",
        "label": "Asset Class [Domain]",
        "terseLabel": "Asset Class"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueByAssetClassAxis": {
     "auth_ref": [
      "r314",
      "r319"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by class of asset.",
        "label": "Asset Class [Axis]",
        "terseLabel": "Asset Class"
       }
      }
     },
     "localname": "FairValueByAssetClassAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByFairValueHierarchyLevelAxis": {
     "auth_ref": [
      "r213",
      "r215",
      "r216",
      "r258",
      "r259",
      "r260",
      "r261",
      "r262",
      "r263",
      "r264",
      "r266",
      "r315",
      "r348",
      "r349",
      "r350"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by level within fair value hierarchy and fair value measured at net asset value per share as practical expedient.",
        "label": "Fair Value Hierarchy and NAV [Axis]",
        "terseLabel": "Level 3"
       }
      }
     },
     "localname": "FairValueByFairValueHierarchyLevelAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Fair Value Disclosures [Abstract]"
       }
      }
     },
     "localname": "FairValueDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueInputsLevel1Member": {
     "auth_ref": [
      "r213",
      "r258",
      "r259",
      "r264",
      "r266",
      "r315",
      "r348"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Quoted prices in active markets for identical assets or liabilities that the reporting entity can access at the measurement date.",
        "label": "Fair Value, Inputs, Level 1 [Member]",
        "terseLabel": "Level 1"
       }
      }
     },
     "localname": "FairValueInputsLevel1Member",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueInputsLevel2Member": {
     "auth_ref": [
      "r213",
      "r215",
      "r216",
      "r258",
      "r259",
      "r264",
      "r266",
      "r315",
      "r349"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Inputs other than quoted prices included within level 1 that are observable for an asset or liability, either directly or indirectly, including, but not limited to, quoted prices for similar assets or liabilities in active markets, or quoted prices for identical or similar assets or liabilities in inactive markets.",
        "label": "Fair Value, Inputs, Level 2 [Member]",
        "terseLabel": "Level 2"
       }
      }
     },
     "localname": "FairValueInputsLevel2Member",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueInputsLevel3Member": {
     "auth_ref": [
      "r213",
      "r215",
      "r216",
      "r258",
      "r259",
      "r260",
      "r261",
      "r262",
      "r263",
      "r264",
      "r266",
      "r315",
      "r350"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value, Inputs, Level 3 [Member]",
        "terseLabel": "Level 3"
       }
      }
     },
     "localname": "FairValueInputsLevel3Member",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementsFairValueHierarchyDomain": {
     "auth_ref": [
      "r213",
      "r215",
      "r216",
      "r258",
      "r259",
      "r260",
      "r261",
      "r262",
      "r263",
      "r264",
      "r266",
      "r348",
      "r349",
      "r350"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Categories used to prioritize the inputs to valuation techniques to measure fair value.",
        "label": "Fair Value Hierarchy and NAV [Domain]",
        "terseLabel": "Fair Value Hierarchy and NAV"
       }
      }
     },
     "localname": "FairValueMeasurementsFairValueHierarchyDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueOptionChangesInFairValueGainLoss1": {
     "auth_ref": [
      "r322"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "For each line item in the statement of financial position, the amounts of gains and losses from fair value changes included in earnings.",
        "label": "Fair Value, Option, Changes in Fair Value, Gain (Loss)",
        "terseLabel": "Common stock, Change in fair value"
       }
      }
     },
     "localname": "FairValueOptionChangesInFairValueGainLoss1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancialInstrumentsDisclosureTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for financial instruments. This disclosure includes, but is not limited to, fair value measurements of short and long term marketable securities, international currencies forward contracts, and auction rate securities. Financial instruments may include hedging and non-hedging currency exchange instruments, derivatives, securitizations and securities available for sale at fair value. Also included are investment results, realized and unrealized gains and losses as well as impairments and risk management disclosures.",
        "label": "Financial Instruments Disclosure [Text Block]",
        "terseLabel": "Financial Instruments"
       }
      }
     },
     "localname": "FinancialInstrumentsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstruments"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1": {
     "auth_ref": [
      "r360"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Remaining amortization period of finite-lived intangible assets, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Finite-Lived Intangible Assets, Remaining Amortization Period",
        "terseLabel": "Intangible assets, remaining amortization period"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_Goodwill": {
     "auth_ref": [
      "r190",
      "r191",
      "r343",
      "r377"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 6.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after accumulated impairment loss of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill",
        "periodEndLabel": "Goodwill, Ending Balance",
        "periodStartLabel": "Goodwill, Beginning Balance",
        "terseLabel": "Goodwill",
        "totalLabel": "Goodwill, Total"
       }
      }
     },
     "localname": "Goodwill",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest": {
     "auth_ref": [
      "r66",
      "r135",
      "r137",
      "r140",
      "r143",
      "r145",
      "r375",
      "r382",
      "r386",
      "r401"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 0.0,
       "parentTag": "us-gaap_NetIncomeLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (loss) from continuing operations, including income (loss) from equity method investments, before deduction of income tax expense (benefit), and income (loss) attributable to noncontrolling interest.",
        "label": "Income (Loss) from Continuing Operations before Income Taxes, Noncontrolling Interest",
        "totalLabel": "Loss before income taxes"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeStatementAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Income Statement [Abstract]"
       }
      }
     },
     "localname": "IncomeStatementAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeStatementLocationAxis": {
     "auth_ref": [
      "r197",
      "r198"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by location in the income statement.",
        "label": "Income Statement Location [Axis]",
        "terseLabel": "Income Statement Location"
       }
      }
     },
     "localname": "IncomeStatementLocationAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeStatementLocationDomain": {
     "auth_ref": [
      "r198"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Location in the income statement.",
        "label": "Income Statement Location [Domain]",
        "terseLabel": "Income Statement Location"
       }
      }
     },
     "localname": "IncomeStatementLocationDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_IncomeTaxExpenseBenefit": {
     "auth_ref": [
      "r96",
      "r110",
      "r111",
      "r134",
      "r292",
      "r295",
      "r296",
      "r402"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 1.0,
       "parentTag": "us-gaap_NetIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations.",
        "label": "Income Tax Expense (Benefit)",
        "negatedLabel": "Provision for income taxes",
        "totalLabel": "Income Tax Expense (Benefit), Total"
       }
      }
     },
     "localname": "IncomeTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccountsReceivable": {
     "auth_ref": [
      "r85"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 9.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in amount due within one year (or one business cycle) from customers for the credit sale of goods and services.",
        "label": "Increase (Decrease) in Accounts Receivable",
        "negatedLabel": "Accounts receivable"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsReceivable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInInventories": {
     "auth_ref": [
      "r85"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 10.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate value of all inventory held by the reporting entity, associated with underlying transactions that are classified as operating activities.",
        "label": "Increase (Decrease) in Inventories",
        "negatedLabel": "Inventory",
        "totalLabel": "Increase (Decrease) in Inventories, Total"
       }
      }
     },
     "localname": "IncreaseDecreaseInInventories",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOperatingCapitalAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Increase (Decrease) in Operating Capital [Abstract]",
        "terseLabel": "Changes in operating assets and liabilities:"
       }
      }
     },
     "localname": "IncreaseDecreaseInOperatingCapitalAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets": {
     "auth_ref": [
      "r85"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 13.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in prepaid expenses, and assets classified as other.",
        "label": "Increase (Decrease) in Prepaid Expense and Other Assets",
        "negatedLabel": "Prepaid expenses and other assets",
        "totalLabel": "Increase (Decrease) in Prepaid Expense and Other Assets, Total"
       }
      }
     },
     "localname": "IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IntangibleAssetsNetExcludingGoodwill": {
     "auth_ref": [
      "r192",
      "r194"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 5.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts of all intangible assets, excluding goodwill, as of the balance sheet date, net of accumulated amortization and impairment charges.",
        "label": "Intangible Assets, Net (Excluding Goodwill)",
        "terseLabel": "Intangible assets, net",
        "totalLabel": "Intangible Assets, Net (Excluding Goodwill), Total"
       }
      }
     },
     "localname": "IntangibleAssetsNetExcludingGoodwill",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryFinishedGoods": {
     "auth_ref": [
      "r39"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfInventoryDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_InventoryNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before valuation and LIFO reserves of completed merchandise or goods expected to be sold within one year or operating cycle, if longer.",
        "label": "Inventory, Finished Goods, Gross",
        "terseLabel": "Finished goods",
        "totalLabel": "Inventory, Finished Goods, Gross, Total"
       }
      }
     },
     "localname": "InventoryFinishedGoods",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfInventoryDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryNet": {
     "auth_ref": [
      "r3",
      "r41",
      "r343"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfInventoryDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 5.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after valuation and LIFO reserves of inventory expected to be sold, or consumed within one year or operating cycle, if longer.",
        "label": "Inventory, Net",
        "terseLabel": "Inventory",
        "totalLabel": "Total inventory"
       }
      }
     },
     "localname": "InventoryNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfInventoryDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryWorkInProcess": {
     "auth_ref": [
      "r40"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfInventoryDetails": {
       "order": 0.0,
       "parentTag": "us-gaap_InventoryNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before valuation and LIFO reserves of merchandise or goods in the production process expected to be completed within one year or operating cycle, if longer.",
        "label": "Inventory, Work in Process, Gross",
        "terseLabel": "Work-in-process"
       }
      }
     },
     "localname": "InventoryWorkInProcess",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfInventoryDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentIncomeInterest": {
     "auth_ref": [
      "r71",
      "r132"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before accretion (amortization) of purchase discount (premium) of interest income on nonoperating securities.",
        "label": "Investment Income, Interest",
        "terseLabel": "Interest income",
        "totalLabel": "Investment Income Interest, Total"
       }
      }
     },
     "localname": "InvestmentIncomeInterest",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentTypeAxis": {
     "auth_ref": [
      "r414",
      "r415",
      "r416",
      "r417",
      "r418",
      "r419",
      "r420",
      "r421",
      "r422",
      "r423",
      "r424",
      "r425",
      "r426",
      "r427",
      "r428"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of investments.",
        "label": "Investment Type [Axis]",
        "terseLabel": "Investment Type"
       }
      }
     },
     "localname": "InvestmentTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InvestmentTypeCategorizationMember": {
     "auth_ref": [
      "r414",
      "r415",
      "r416",
      "r417",
      "r418",
      "r419",
      "r420",
      "r421",
      "r422",
      "r423",
      "r424",
      "r425",
      "r426",
      "r427",
      "r428"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Asset obtained to generate income or appreciate in value.",
        "label": "Investments [Domain]",
        "terseLabel": "Investments"
       }
      }
     },
     "localname": "InvestmentTypeCategorizationMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InvestmentsDebtAndEquitySecuritiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Investments, Debt and Equity Securities [Abstract]"
       }
      }
     },
     "localname": "InvestmentsDebtAndEquitySecuritiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_InvestmentsFairValueDisclosure": {
     "auth_ref": [
      "r314"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Fair value portion of investment securities, including, but not limited to, marketable securities, derivative financial instruments, and investments accounted for under the equity method.",
        "label": "Investments, Fair Value Disclosure",
        "periodEndLabel": "Common stock, Ending balance",
        "periodStartLabel": "Common stock, Beginning balance",
        "terseLabel": "Total fair value",
        "totalLabel": "Investments, Fair Value Disclosure, Total"
       }
      }
     },
     "localname": "InvestmentsFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Liabilities": {
     "auth_ref": [
      "r33",
      "r95",
      "r139",
      "r169",
      "r200",
      "r201",
      "r202",
      "r204",
      "r205",
      "r206",
      "r207",
      "r208",
      "r209",
      "r210",
      "r306",
      "r308",
      "r309",
      "r321",
      "r341",
      "r342"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 0.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all liabilities that are recognized. Liabilities are probable future sacrifices of economic benefits arising from present obligations of an entity to transfer assets or provide services to other entities in the future.",
        "label": "Liabilities",
        "totalLabel": "Total liabilities"
       }
      }
     },
     "localname": "Liabilities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquity": {
     "auth_ref": [
      "r24",
      "r95",
      "r169",
      "r321",
      "r343",
      "r379",
      "r395"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of liabilities and equity items, including the portion of equity attributable to noncontrolling interests, if any.",
        "label": "Liabilities and Equity",
        "totalLabel": "Total liabilities and stockholders\u2019 equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Liabilities and Equity [Abstract]",
        "terseLabel": "Liabilities and Stockholders\u2019 Equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesCurrent": {
     "auth_ref": [
      "r35",
      "r95",
      "r169",
      "r200",
      "r201",
      "r202",
      "r204",
      "r205",
      "r206",
      "r207",
      "r208",
      "r209",
      "r210",
      "r306",
      "r308",
      "r309",
      "r321",
      "r341",
      "r342",
      "r343"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 0.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total obligations incurred as part of normal operations that are expected to be paid during the following twelve months or within one business cycle, if longer.",
        "label": "Liabilities, Current",
        "totalLabel": "Total current liabilities"
       }
      }
     },
     "localname": "LiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Liabilities, Current [Abstract]",
        "terseLabel": "Current liabilities:"
       }
      }
     },
     "localname": "LiabilitiesCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LicenseAgreementTermsMember": {
     "auth_ref": [
      "r288",
      "r289"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Terms of the license agreements under research and development arrangements accounted for as a contract to perform research and development for others.",
        "label": "License Agreement Terms [Member]",
        "terseLabel": "License Agreement"
       }
      }
     },
     "localname": "LicenseAgreementTermsMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_MoneyMarketFundsMember": {
     "auth_ref": [
      "r258"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Fund that invests in short-term money-market instruments, for example, but not limited to, commercial paper, banker's acceptances, repurchase agreements, government securities, certificates of deposit, and other highly liquid securities.",
        "label": "Money Market Funds [Member]",
        "terseLabel": "Money Market Funds"
       }
      }
     },
     "localname": "MoneyMarketFundsMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureFinancialInstrumentsSummaryOfFinancialAssetsMeasuredOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_NatureOfOperations": {
     "auth_ref": [
      "r120",
      "r128"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for the nature of an entity's business, major products or services, principal markets including location, and the relative importance of its operations in each business and the basis for the determination, including but not limited to, assets, revenues, or earnings. For an entity that has not commenced principal operations, disclosures about the risks and uncertainties related to the activities in which the entity is currently engaged and an understanding of what those activities are being directed toward.",
        "label": "Nature of Operations [Text Block]",
        "terseLabel": "Organization"
       }
      }
     },
     "localname": "NatureOfOperations",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganization"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivities": {
     "auth_ref": [
      "r83"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from financing activities, including discontinued operations. Financing activity cash flows include obtaining resources from owners and providing them with a return on, and a return of, their investment; borrowing money and repaying amounts borrowed, or settling the obligation; and obtaining and paying for other resources obtained from creditors on long-term credit.",
        "label": "Net Cash Provided by (Used in) Financing Activities",
        "totalLabel": "Net cash provided by financing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Financing Activities [Abstract]",
        "terseLabel": "Financing activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivities": {
     "auth_ref": [
      "r83"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from investing activities, including discontinued operations. Investing activity cash flows include making and collecting loans and acquiring and disposing of debt or equity instruments and property, plant, and equipment and other productive assets.",
        "label": "Net Cash Provided by (Used in) Investing Activities",
        "totalLabel": "Net cash provided by (used in) investing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Investing Activities [Abstract]",
        "terseLabel": "Investing activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivities": {
     "auth_ref": [
      "r83",
      "r84",
      "r87"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 0.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from operating activities, including discontinued operations. Operating activity cash flows include transactions, adjustments, and changes in value not defined as investing or financing activities.",
        "label": "Net Cash Provided by (Used in) Operating Activities",
        "totalLabel": "Net cash used in operating activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Operating Activities [Abstract]",
        "terseLabel": "Operating activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetIncomeLoss": {
     "auth_ref": [
      "r1",
      "r55",
      "r58",
      "r63",
      "r67",
      "r87",
      "r95",
      "r103",
      "r105",
      "r106",
      "r107",
      "r108",
      "r110",
      "r111",
      "r113",
      "r135",
      "r137",
      "r140",
      "r143",
      "r145",
      "r169",
      "r200",
      "r201",
      "r202",
      "r204",
      "r205",
      "r206",
      "r207",
      "r208",
      "r209",
      "r210",
      "r313",
      "r321",
      "r383",
      "r398"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 0.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited": {
       "order": 0.0,
       "parentTag": "us-gaap_ComprehensiveIncomeNetOfTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The portion of profit or loss for the period, net of income taxes, which is attributable to the parent.",
        "label": "Net Income (Loss) Attributable to Parent",
        "terseLabel": "Net loss",
        "totalLabel": "Net loss",
        "verboseLabel": "Net income (loss)"
       }
      }
     },
     "localname": "NetIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited",
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NumberOfReportableSegments": {
     "auth_ref": [
      "r129"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of segments reported by the entity. A reportable segment is a component of an entity for which there is an accounting requirement to report separate financial information on that component in the entity's financial statements.",
        "label": "Number of Reportable Segments",
        "terseLabel": "Number of reportable segments"
       }
      }
     },
     "localname": "NumberOfReportableSegments",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureOrganizationAdditionalInformationDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_OperatingExpensesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Operating Expenses [Abstract]",
        "terseLabel": "Operating expenses:"
       }
      }
     },
     "localname": "OperatingExpensesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OperatingIncomeLoss": {
     "auth_ref": [
      "r135",
      "r137",
      "r140",
      "r143",
      "r145"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 0.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The net result for the period of deducting operating expenses from operating revenues.",
        "label": "Operating Income (Loss)",
        "totalLabel": "Loss from operations"
       }
      }
     },
     "localname": "OperatingIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseRightOfUseAsset": {
     "auth_ref": [
      "r337"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 4.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's right to use underlying asset under operating lease.",
        "label": "Operating Lease, Right-of-Use Asset",
        "terseLabel": "Right-of-use assets"
       }
      }
     },
     "localname": "OperatingLeaseRightOfUseAsset",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Organization, Consolidation and Presentation of Financial Statements [Abstract]"
       }
      }
     },
     "localname": "OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherAccruedLiabilitiesCurrent": {
     "auth_ref": [
      "r8",
      "r9",
      "r10",
      "r34"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expenses incurred but not yet paid classified as other, due within one year or the normal operating cycle, if longer.",
        "label": "Other Accrued Liabilities, Current",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "OtherAccruedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherAssetsNoncurrent": {
     "auth_ref": [
      "r31"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 7.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of noncurrent assets classified as other.",
        "label": "Other Assets, Noncurrent",
        "terseLabel": "Other assets",
        "totalLabel": "Other Assets, Noncurrent, Total"
       }
      }
     },
     "localname": "OtherAssetsNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationGainLossArisingDuringPeriodNetOfTax": {
     "auth_ref": [
      "r49",
      "r52",
      "r323",
      "r324",
      "r326"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited": {
       "order": 0.0,
       "parentTag": "us-gaap_OtherComprehensiveIncomeLossNetOfTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after tax, before reclassification adjustments of gain (loss) on foreign currency translation adjustments, foreign currency transactions designated and effective as economic hedges of a net investment in a foreign entity and intra-entity foreign currency transactions that are of a long-term-investment nature.",
        "label": "Other Comprehensive Income (Loss), Foreign Currency Transaction and Translation Gain (Loss) Arising During Period, Net of Tax",
        "terseLabel": "Foreign currency translation adjustments"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationGainLossArisingDuringPeriodNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossNetOfTax": {
     "auth_ref": [
      "r56",
      "r59",
      "r61",
      "r62",
      "r64",
      "r68",
      "r231",
      "r327",
      "r332",
      "r333",
      "r384",
      "r399"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited": {
       "order": 1.0,
       "parentTag": "us-gaap_ComprehensiveIncomeNetOfTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after tax and reclassification adjustments of other comprehensive income (loss).",
        "label": "Other Comprehensive Income (Loss), Net of Tax",
        "terseLabel": "Other comprehensive income (loss)",
        "totalLabel": "Other comprehensive income (loss):"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited",
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Other Comprehensive Income (Loss), Net of Tax [Abstract]",
        "terseLabel": "Other comprehensive income (loss):"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax": {
     "auth_ref": [
      "r50",
      "r52"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited": {
       "order": 1.0,
       "parentTag": "us-gaap_OtherComprehensiveIncomeLossNetOfTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after tax and before adjustment, of unrealized holding gain (loss) on investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale). Excludes unrealized gain (loss) on investment in debt security measured at amortized cost (held-to-maturity) from transfer to available-for-sale.",
        "label": "OCI, Debt Securities, Available-for-Sale, Unrealized Holding Gain (Loss), before Adjustment, after Tax",
        "terseLabel": "Unrealized gain (loss) on available-for-sale securities"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherLiabilitiesNoncurrent": {
     "auth_ref": [
      "r37"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 6.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of liabilities classified as other, due after one year or the normal operating cycle, if longer.",
        "label": "Other Liabilities, Noncurrent",
        "terseLabel": "Other liabilities",
        "totalLabel": "Other Liabilities, Noncurrent, Total"
       }
      }
     },
     "localname": "OtherLiabilitiesNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNoncashIncomeExpense": {
     "auth_ref": [
      "r87"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (expense) included in net income that results in no cash inflow (outflow), classified as other.",
        "label": "Other Noncash Income (Expense)",
        "negatedLabel": "Other",
        "terseLabel": "Other",
        "totalLabel": "Other Noncash Income (Expense), Total"
       }
      }
     },
     "localname": "OtherNoncashIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNonoperatingIncomeExpense": {
     "auth_ref": [
      "r72"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 4.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (expense) related to nonoperating activities, classified as other.",
        "label": "Other Nonoperating Income (Expense)",
        "terseLabel": "Other expense",
        "totalLabel": "Other Nonoperating Income (Expense), Total"
       }
      }
     },
     "localname": "OtherNonoperatingIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherReceivables": {
     "auth_ref": [
      "r42"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount due from parties in nontrade transactions, classified as other.",
        "label": "Other Receivables",
        "terseLabel": "License agreement other receivables"
       }
      }
     },
     "localname": "OtherReceivables",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PayablesAndAccrualsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Payables and Accruals [Abstract]"
       }
      }
     },
     "localname": "PayablesAndAccrualsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_PaymentsForProceedsFromOtherInvestingActivities": {
     "auth_ref": [
      "r76",
      "r79"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash (inflow) outflow from investing activities classified as other.",
        "label": "Payments for (Proceeds from) Other Investing Activities",
        "negatedLabel": "Other",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "PaymentsForProceedsFromOtherInvestingActivities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt": {
     "auth_ref": [
      "r74",
      "r77",
      "r154"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash outflow to acquire investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Payments to Acquire Debt Securities, Available-for-sale",
        "negatedLabel": "Purchase of marketable debt securities"
       }
      }
     },
     "localname": "PaymentsToAcquireAvailableForSaleSecuritiesDebt",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireIntangibleAssets": {
     "auth_ref": [
      "r78"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash outflow to acquire asset without physical form usually arising from contractual or other legal rights, excluding goodwill.",
        "label": "Payments to Acquire Intangible Assets",
        "negatedLabel": "Payment for intangible asset",
        "terseLabel": "Payment for intangible asset"
       }
      }
     },
     "localname": "PaymentsToAcquireIntangibleAssets",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquirePropertyPlantAndEquipment": {
     "auth_ref": [
      "r78"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 0.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash outflow associated with the acquisition of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale; includes cash outflows to pay for construction of self-constructed assets.",
        "label": "Payments to Acquire Property, Plant, and Equipment",
        "negatedLabel": "Purchase of property, plant, and equipment",
        "totalLabel": "Payments to Acquire Property, Plant, and Equipment, Total"
       }
      }
     },
     "localname": "PaymentsToAcquirePropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PlanNameAxis": {
     "auth_ref": [
      "r274",
      "r277"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by plan name for share-based payment arrangement.",
        "label": "Plan Name [Axis]",
        "terseLabel": "Plan Name"
       }
      }
     },
     "localname": "PlanNameAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PlanNameDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Plan name for share-based payment arrangement.",
        "label": "Plan Name [Domain]",
        "terseLabel": "Plan Name"
       }
      }
     },
     "localname": "PlanNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PreferredStockSharesAuthorized": {
     "auth_ref": [
      "r16"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The maximum number of nonredeemable preferred shares (or preferred stock redeemable solely at the option of the issuer) permitted to be issued by an entity's charter and bylaws.",
        "label": "Preferred Stock, Shares Authorized",
        "terseLabel": "Preferred stock, shares authorized"
       }
      }
     },
     "localname": "PreferredStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockSharesOutstanding": {
     "auth_ref": [
      "r16"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate share number for all nonredeemable preferred stock (or preferred stock redeemable solely at the option of the issuer) held by stockholders. Does not include preferred shares that have been repurchased.",
        "label": "Preferred Stock, Shares Outstanding",
        "periodEndLabel": "Preferred Stock, Shares Outstanding, Ending Balance",
        "periodStartLabel": "Preferred Stock, Shares Outstanding, Beginning Balance",
        "terseLabel": "Preferred stock, shares outstanding"
       }
      }
     },
     "localname": "PreferredStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockValue": {
     "auth_ref": [
      "r16",
      "r343"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 0.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable preferred stock (or preferred stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable preferred shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Preferred Stock, Value, Issued",
        "periodEndLabel": "Preferred Stock, Value, Issued, Ending Balance",
        "periodStartLabel": "Preferred Stock, Value, Issued, Beginning Balance",
        "terseLabel": "Preferred stock - 25,000,000 shares authorized; nil outstanding as of June 30, 2022 and December 31, 2021",
        "totalLabel": "Preferred Stock, Value, Issued, Total"
       }
      }
     },
     "localname": "PreferredStockValue",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PrepaidExpenseAndOtherAssetsCurrent": {
     "auth_ref": [
      "r5",
      "r28",
      "r29"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 6.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of asset related to consideration paid in advance for costs that provide economic benefits in future periods, and amount of other assets that are expected to be realized or consumed within one year or the normal operating cycle, if longer.",
        "label": "Prepaid Expense and Other Assets, Current",
        "terseLabel": "Prepaid expenses and other current assets"
       }
      }
     },
     "localname": "PrepaidExpenseAndOtherAssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PrepaidExpensesAndOtherCurrentAssetsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Primary financial statement caption encompassing prepaid expenses and other current assets.",
        "label": "Prepaid Expenses and Other Current Assets [Member]",
        "terseLabel": "Prepaid Expenses and Other Current Assets"
       }
      }
     },
     "localname": "PrepaidExpensesAndOtherCurrentAssetsMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions": {
     "auth_ref": [
      "r80",
      "r278"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow from issuance of shares under share-based payment arrangement. Includes, but is not limited to, option exercised.",
        "label": "Proceeds, Issuance of Shares, Share-based Payment Arrangement, Including Option Exercised",
        "terseLabel": "Proceeds from the issuance of common stock equity plan awards, net",
        "totalLabel": "Proceeds, Issuance of Shares, Share-based Payment Arrangement, Including Option Exercised, Total"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities": {
     "auth_ref": [
      "r74",
      "r75",
      "r154"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow from maturity, prepayment and call of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Proceeds from Maturities, Prepayments and Calls of Debt Securities, Available-for-sale",
        "terseLabel": "Proceeds from maturities of marketable debt securities"
       }
      }
     },
     "localname": "ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromPaymentsForOtherFinancingActivities": {
     "auth_ref": [
      "r81",
      "r82"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from financing activities classified as other.",
        "label": "Proceeds from (Payments for) Other Financing Activities",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "ProceedsFromPaymentsForOtherFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt": {
     "auth_ref": [
      "r74",
      "r75",
      "r154"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow from sale of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Proceeds from Sale of Debt Securities, Available-for-sale",
        "terseLabel": "Proceeds from sale of marketable debt securities"
       }
      }
     },
     "localname": "ProceedsFromSaleOfAvailableForSaleSecuritiesDebt",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProductMember": {
     "auth_ref": [
      "r249"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Article or substance produced by nature, labor or machinery.",
        "label": "Product [Member]",
        "terseLabel": "Product Sales"
       }
      }
     },
     "localname": "ProductMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Property, Plant and Equipment [Abstract]"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentNet": {
     "auth_ref": [
      "r13",
      "r14",
      "r196",
      "r343",
      "r389",
      "r396"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 1.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after accumulated depreciation, depletion and amortization of physical assets used in the normal conduct of business to produce goods and services and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, and furniture and fixtures.",
        "label": "Property, Plant and Equipment, Net",
        "periodEndLabel": "Property, Plant and Equipment, Net, Ending Balance",
        "periodStartLabel": "Property, Plant and Equipment, Net, Beginning Balance",
        "terseLabel": "Property, plant, and equipment, net",
        "totalLabel": "Property, Plant and Equipment, Net, Total"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentNet",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RelatedPartyDomain": {
     "auth_ref": [
      "r265",
      "r338",
      "r339"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Related parties include affiliates; other entities for which investments are accounted for by the equity method by the entity; trusts for benefit of employees; and principal owners, management, and members of immediate families. It also may include other parties with which the entity may control or can significantly influence the management or operating policies of the other to an extent that one of the transacting parties might be prevented from fully pursuing its own separate interests.",
        "label": "Related Party [Domain]",
        "terseLabel": "Related Party"
       }
      }
     },
     "localname": "RelatedPartyDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RelatedPartyTransactionsByRelatedPartyAxis": {
     "auth_ref": [
      "r265",
      "r338",
      "r340",
      "r363",
      "r364",
      "r365",
      "r366",
      "r367",
      "r368",
      "r369",
      "r370",
      "r371",
      "r372",
      "r373",
      "r374"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of related party. Related parties include, but not limited to, affiliates; other entities for which investments are accounted for by the equity method by the entity; trusts for benefit of employees; and principal owners, management, and members of immediate families. It also may include other parties with which the entity may control or can significantly influence the management or operating policies of the other to an extent that one of the transacting parties might be prevented from fully pursuing its own separate interests.",
        "label": "Related Party [Axis]",
        "terseLabel": "Related Party"
       }
      }
     },
     "localname": "RelatedPartyTransactionsByRelatedPartyAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersByTypeAxis": {
     "auth_ref": [
      "r288",
      "r289"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by form of arrangement related to research and development.",
        "label": "Research and Development Arrangement, Contract to Perform for Others, Type [Axis]",
        "terseLabel": "Research and Development Arrangement, Contract to Perform for Others, Type"
       }
      }
     },
     "localname": "ResearchAndDevelopmentArrangementContractToPerformForOthersByTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersTypeDomain": {
     "auth_ref": [
      "r288",
      "r289"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Listing of significant agreements under research and development arrangements accounted for as a contract to perform research and development for others.",
        "label": "Research and Development Arrangement, Contract to Perform for Others, Type [Domain]",
        "terseLabel": "Research and Development Arrangement, Contract to Perform for Others, Type"
       }
      }
     },
     "localname": "ResearchAndDevelopmentArrangementContractToPerformForOthersTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ResearchAndDevelopmentExpense": {
     "auth_ref": [
      "r287",
      "r358",
      "r443"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 1.0,
       "parentTag": "rare_CostOfSalesAndOperatingExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate costs incurred (1) in a planned search or critical investigation aimed at discovery of new knowledge with the hope that such knowledge will be useful in developing a new product or service, a new process or technique, or in bringing about a significant improvement to an existing product or process; or (2) to translate research findings or other knowledge into a plan or design for a new product or process or for a significant improvement to an existing product or process whether intended for sale or the entity's use, during the reporting period charged to research and development projects, including the costs of developing computer software up to the point in time of achieving technological feasibility, and costs allocated in accounting for a business combination to in-process projects deemed to have no alternative future use.",
        "label": "Research and Development Expense",
        "terseLabel": "Research and development",
        "totalLabel": "Research and Development Expense, Total"
       }
      }
     },
     "localname": "ResearchAndDevelopmentExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ResearchAndDevelopmentExpenseMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Primary financial statement caption in which the reported facts about research and development expense have been included.",
        "label": "Research and Development Expense [Member]",
        "terseLabel": "Research and development"
       }
      }
     },
     "localname": "ResearchAndDevelopmentExpenseMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RestrictedCashAndCashEquivalentsCurrentAssetStatementOfFinancialPositionExtensibleList": {
     "auth_ref": [
      "r90"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicates line item in statement of financial position that includes cash and cash equivalents restricted to withdrawal or usage, classified as current.",
        "label": "Restricted Cash and Cash Equivalents, Current, Statement of Financial Position [Extensible Enumeration]",
        "terseLabel": "Restricted Cash and Cash Equivalents, Current, Asset, Statement of Financial Position [Extensible List]"
       }
      }
     },
     "localname": "RestrictedCashAndCashEquivalentsCurrentAssetStatementOfFinancialPositionExtensibleList",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails"
     ],
     "xbrltype": "enumerationSetItemType"
    },
    "us-gaap_RestrictedCashAndCashEquivalentsNoncurrentAssetStatementOfFinancialPositionExtensibleList": {
     "auth_ref": [
      "r90"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicates line item in statement of financial position that includes cash and cash equivalents restricted to withdrawal or usage, classified as noncurrent.",
        "label": "Restricted Cash and Cash Equivalents, Noncurrent, Statement of Financial Position [Extensible Enumeration]",
        "terseLabel": "Restricted Cash and Cash Equivalents, Noncurrent, Asset, Statement of Financial Position [Extensible List]"
       }
      }
     },
     "localname": "RestrictedCashAndCashEquivalentsNoncurrentAssetStatementOfFinancialPositionExtensibleList",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails"
     ],
     "xbrltype": "enumerationSetItemType"
    },
    "us-gaap_RestrictedCashCurrent": {
     "auth_ref": [
      "r2",
      "r12",
      "r90"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash restricted as to withdrawal or usage, classified as current. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits.",
        "label": "Restricted Cash, Current",
        "terseLabel": "Restricted cash included in prepaid expenses and other current assets"
       }
      }
     },
     "localname": "RestrictedCashCurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedCashNoncurrent": {
     "auth_ref": [
      "r7",
      "r15",
      "r90",
      "r430"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash restricted as to withdrawal or usage, classified as noncurrent. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits.",
        "label": "Restricted Cash, Noncurrent",
        "terseLabel": "Restricted cash included in other assets"
       }
      }
     },
     "localname": "RestrictedCashNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesSummaryOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsAccumulatedDeficit": {
     "auth_ref": [
      "r20",
      "r232",
      "r282",
      "r343",
      "r394",
      "r411",
      "r413"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 4.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings (Accumulated Deficit)",
        "periodEndLabel": "Retained Earnings (Accumulated Deficit), Ending Balance",
        "periodStartLabel": "Retained Earnings (Accumulated Deficit), Beginning Balance",
        "terseLabel": "Accumulated deficit",
        "totalLabel": "Retained Earnings (Accumulated Deficit), Total"
       }
      }
     },
     "localname": "RetainedEarningsAccumulatedDeficit",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsMember": {
     "auth_ref": [
      "r0",
      "r100",
      "r101",
      "r102",
      "r104",
      "r109",
      "r111",
      "r170",
      "r279",
      "r280",
      "r281",
      "r293",
      "r294",
      "r312",
      "r408",
      "r410"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings [Member]",
        "terseLabel": "Accumulated Deficit"
       }
      }
     },
     "localname": "RetainedEarningsMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RevenueFromCollaborativeArrangementExcludingRevenueFromContractWithCustomer": {
     "auth_ref": [
      "r302",
      "r303"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue from collaborative arrangement. Excludes revenue from contract with customer under Topic 606.",
        "label": "Revenue from Collaborative Arrangement, Excluding Revenue from Contract with Customer",
        "terseLabel": "Upfront payment received"
       }
      }
     },
     "localname": "RevenueFromCollaborativeArrangementExcludingRevenueFromContractWithCustomer",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Revenue from Contract with Customer [Abstract]",
        "terseLabel": "Total revenues"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax": {
     "auth_ref": [
      "r130",
      "r131",
      "r136",
      "r141",
      "r142",
      "r146",
      "r147",
      "r149",
      "r244",
      "r245",
      "r359"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 0.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, excluding tax collected from customer, of revenue from satisfaction of performance obligation by transferring promised good or service to customer. Tax collected from customer is tax assessed by governmental authority that is both imposed on and concurrent with specific revenue-producing transaction, including, but not limited to, sales, use, value added and excise.",
        "label": "Revenue from Contract with Customer, Excluding Assessed Tax",
        "terseLabel": "Total revenues",
        "totalLabel": "Revenue from Contract with Customer, Excluding Assessed Tax, Total",
        "verboseLabel": "Collaboration and license revenue"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerExcludingAssessedTax",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerTextBlock": {
     "auth_ref": [
      "r236",
      "r237",
      "r238",
      "r239",
      "r240",
      "r241",
      "r242",
      "r243",
      "r248",
      "r256"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure of revenue from contract with customer to transfer good or service and to transfer nonfinancial asset. Includes, but is not limited to, disaggregation of revenue, credit loss recognized from contract with customer, judgment and change in judgment related to contract with customer, and asset recognized from cost incurred to obtain or fulfill contract with customer. Excludes insurance and lease contracts.",
        "label": "Revenue from Contract with Customer [Text Block]",
        "terseLabel": "Revenue"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenue"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RevenueRecognitionPolicyTextBlock": {
     "auth_ref": [
      "r92",
      "r93"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for revenue. Includes revenue from contract with customer and from other sources.",
        "label": "Revenue [Policy Text Block]",
        "terseLabel": "Revenue Recognition"
       }
      }
     },
     "localname": "RevenueRecognitionPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_Revenues": {
     "auth_ref": [
      "r65",
      "r95",
      "r130",
      "r131",
      "r136",
      "r141",
      "r142",
      "r146",
      "r147",
      "r149",
      "r169",
      "r200",
      "r201",
      "r202",
      "r204",
      "r205",
      "r206",
      "r207",
      "r208",
      "r209",
      "r210",
      "r321",
      "r386"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue recognized from goods sold, services rendered, insurance premiums, or other activities that constitute an earning process. Includes, but is not limited to, investment and interest income before deduction of interest expense when recognized as a component of revenue, and sales and trading gain (loss).",
        "label": "Revenues",
        "terseLabel": "Sales",
        "totalLabel": "Revenues, Total"
       }
      }
     },
     "localname": "Revenues",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenuesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Revenues [Abstract]",
        "terseLabel": "Revenues:"
       }
      }
     },
     "localname": "RevenuesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RoyaltyMember": {
     "auth_ref": [
      "r249"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Money for usage-based right to asset.",
        "label": "Royalty [Member]",
        "terseLabel": "Non-cash Collaboration Royalty Revenue"
       }
      }
     },
     "localname": "RoyaltyMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SaleOfStockNameOfTransactionDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sale of the entity's stock, including, but not limited to, initial public offering (IPO) and private placement.",
        "label": "Sale of Stock [Domain]",
        "terseLabel": "Sale of Stock"
       }
      }
     },
     "localname": "SaleOfStockNameOfTransactionDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the components of accrued liabilities.",
        "label": "Schedule of Accrued Liabilities [Table Text Block]",
        "terseLabel": "Accrued Liabilities"
       }
      }
     },
     "localname": "ScheduleOfAccruedLiabilitiesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock": {
     "auth_ref": [
      "r54",
      "r332",
      "r333"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the components of accumulated other comprehensive income (loss).",
        "label": "Schedule of Accumulated Other Comprehensive Income (Loss) [Table Text Block]",
        "terseLabel": "Schedule of Total Accumulated Other Comprehensive Loss"
       }
      }
     },
     "localname": "ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureAccumulatedOtherComprehensiveLossTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable": {
     "auth_ref": [
      "r115"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule for securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by Antidilutive Securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table]",
        "terseLabel": "Schedule Of Antidilutive Securities Excluded From Computation Of Earnings Per Share [Table]"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock": {
     "auth_ref": [
      "r115"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by antidilutive securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table Text Block]",
        "terseLabel": "Outstanding Shares of Common Stock Equivalents Excluded from Computation of Diluted Net Loss per Share"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Debt Securities, Available-for-sale [Line Items]",
        "terseLabel": "Schedule Of Available For Sale Securities [Line Items]"
       }
      }
     },
     "localname": "ScheduleOfAvailableForSaleSecuritiesLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfCashEquivalentsAndInvestmentsClassifiedAsAvailableForSaleSecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfAvailableForSaleSecuritiesTable": {
     "auth_ref": [
      "r160",
      "r161",
      "r163",
      "r164",
      "r165",
      "r166",
      "r387",
      "r388"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of available-for-sale securities which includes, but is not limited to, changes in the cost basis and fair value, fair value and gross unrealized gain (loss), fair values by type of security, contractual maturity and classification, amortized cost basis, contracts to acquire securities to be accounted for as available-for-sale, debt maturities, transfers to trading, change in net unrealized holding gain (loss) net of tax, continuous unrealized loss position fair value, aggregate losses qualitative disclosures, other than temporary impairment (OTTI) losses or other disclosures related to available for sale securities.",
        "label": "Schedule of Available-for-sale Securities [Table]",
        "terseLabel": "Schedule Of Available For Sale Securities [Table]"
       }
      }
     },
     "localname": "ScheduleOfAvailableForSaleSecuritiesTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable": {
     "auth_ref": [
      "r304"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Table]",
        "terseLabel": "Schedule Of Collaborative Arrangements And Noncollaborative Arrangement Transactions [Table]"
       }
      }
     },
     "localname": "ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable": {
     "auth_ref": [
      "r273",
      "r275",
      "r283"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about amount recognized for award under share-based payment arrangement. Includes, but is not limited to, amount expensed in statement of income or comprehensive income, amount capitalized in statement of financial position, and corresponding reporting line item in financial statements.",
        "label": "Share-based Payment Arrangement, Expensed and Capitalized, Amount [Table]",
        "terseLabel": "Schedule Of Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Table]"
       }
      }
     },
     "localname": "ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock": {
     "auth_ref": [
      "r273",
      "r275",
      "r283"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of allocation of amount expensed and capitalized for award under share-based payment arrangement to statement of income or comprehensive income and statement of financial position. Includes, but is not limited to, corresponding line item in financial statement.",
        "label": "Share-based Payment Arrangement, Expensed and Capitalized, Amount [Table Text Block]",
        "terseLabel": "Summary of Stock-Based Compensation Expense"
       }
      }
     },
     "localname": "ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfInventoryCurrentTableTextBlock": {
     "auth_ref": [
      "r11",
      "r25",
      "r26",
      "r27"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the carrying amount as of the balance sheet date of merchandise, goods, commodities, or supplies held for future sale or to be used in manufacturing, servicing or production process.",
        "label": "Schedule of Inventory, Current [Table Text Block]",
        "terseLabel": "Summary of Inventory"
       }
      }
     },
     "localname": "ScheduleOfInventoryCurrentTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfRestrictedCashAndCashEquivalentsTextBlock": {
     "auth_ref": [
      "r12",
      "r90",
      "r376",
      "r392"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of cash and cash equivalents restricted as to withdrawal or usage.",
        "label": "Restrictions on Cash and Cash Equivalents [Table Text Block]",
        "terseLabel": "Summary of Reconciliation of Cash, Cash Equivalents and Restricted Cash"
       }
      }
     },
     "localname": "ScheduleOfRestrictedCashAndCashEquivalentsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable": {
     "auth_ref": [
      "r274",
      "r277"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about share-based payment arrangement.",
        "label": "Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table]",
        "terseLabel": "Schedule Of Share Based Compensation Arrangements By Share Based Payment Award [Table]"
       }
      }
     },
     "localname": "ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SellingGeneralAndAdministrativeExpense": {
     "auth_ref": [
      "r70"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited": {
       "order": 2.0,
       "parentTag": "rare_CostOfSalesAndOperatingExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate total costs related to selling a firm's product and services, as well as all other general and administrative expenses. Direct selling expenses (for example, credit, warranty, and advertising) are expenses that can be directly linked to the sale of specific products. Indirect selling expenses are expenses that cannot be directly linked to the sale of specific products, for example telephone expenses, Internet, and postal charges. General and administrative expenses include salaries of non-sales personnel, rent, utilities, communication, etc.",
        "label": "Selling, General and Administrative Expense",
        "terseLabel": "Selling, general and administrative",
        "totalLabel": "Selling, General and Administrative Expense, Total"
       }
      }
     },
     "localname": "SellingGeneralAndAdministrativeExpense",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SellingGeneralAndAdministrativeExpensesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Primary financial statement caption encompassing selling, general and administrative expense.",
        "label": "Selling, General and Administrative Expenses [Member]",
        "terseLabel": "Selling, general and administrative"
       }
      }
     },
     "localname": "SellingGeneralAndAdministrativeExpensesMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsSummaryOfStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award [Line Items]",
        "terseLabel": "Share Based Compensation Arrangement By Share Based Payment Award [Line Items]"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant": {
     "auth_ref": [
      "r277"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The difference between the maximum number of shares (or other type of equity) authorized for issuance under the plan (including the effects of amendments and adjustments), and the sum of: 1) the number of shares (or other type of equity) already issued upon exercise of options or other equity-based awards under the plan; and 2) shares (or other type of equity) reserved for issuance on granting of outstanding awards, net of cancellations and forfeitures, if applicable.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Number of Shares Available for Grant",
        "terseLabel": "Share reserved for future issuance"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureStockBasedAwardsAdditionalInformationDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_SharesIssuedPricePerShare": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Per share or per unit amount of equity securities issued.",
        "label": "Shares Issued, Price Per Share",
        "terseLabel": "Stock price"
       }
      }
     },
     "localname": "SharesIssuedPricePerShare",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_SignificantAccountingPoliciesTextBlock": {
     "auth_ref": [
      "r91",
      "r99"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for all significant accounting policies of the reporting entity.",
        "label": "Significant Accounting Policies [Text Block]",
        "terseLabel": "Summary of Significant Accounting Policies"
       }
      }
     },
     "localname": "SignificantAccountingPoliciesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_StatementEquityComponentsAxis": {
     "auth_ref": [
      "r0",
      "r38",
      "r61",
      "r62",
      "r63",
      "r100",
      "r101",
      "r102",
      "r104",
      "r109",
      "r111",
      "r119",
      "r170",
      "r231",
      "r232",
      "r279",
      "r280",
      "r281",
      "r293",
      "r294",
      "r312",
      "r327",
      "r328",
      "r329",
      "r330",
      "r331",
      "r333",
      "r408",
      "r409",
      "r410",
      "r450"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by component of equity.",
        "label": "Equity Components [Axis]",
        "terseLabel": "Equity Components"
       }
      }
     },
     "localname": "StatementEquityComponentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Statement [Line Items]",
        "terseLabel": "Statement [Line Items]"
       }
      }
     },
     "localname": "StatementLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfCashFlowsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Cash Flows [Abstract]"
       }
      }
     },
     "localname": "StatementOfCashFlowsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfFinancialPositionAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Financial Position [Abstract]"
       }
      }
     },
     "localname": "StatementOfFinancialPositionAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfIncomeAndComprehensiveIncomeAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Comprehensive Income [Abstract]"
       }
      }
     },
     "localname": "StatementOfIncomeAndComprehensiveIncomeAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Stockholders' Equity [Abstract]"
       }
      }
     },
     "localname": "StatementOfStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementTable": {
     "auth_ref": [
      "r100",
      "r101",
      "r102",
      "r119",
      "r359"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule reflecting a Statement of Income, Statement of Cash Flows, Statement of Financial Position, Statement of Shareholders' Equity and Other Comprehensive Income, or other statement as needed.",
        "label": "Statement [Table]",
        "terseLabel": "Statement [Table]"
       }
      }
     },
     "localname": "StatementTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesNewIssues": {
     "auth_ref": [
      "r16",
      "r17",
      "r231",
      "r232"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of new stock issued during the period.",
        "label": "Stock Issued During Period, Shares, New Issues",
        "terseLabel": "Common stock shares sold"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesNewIssues",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockholdersEquity": {
     "auth_ref": [
      "r17",
      "r22",
      "r23",
      "r95",
      "r152",
      "r169",
      "r321",
      "r343"
     ],
     "calculation": {
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total of all stockholders' equity (deficit) items, net of receivables from officers, directors, owners, and affiliates of the entity which are attributable to the parent. The amount of the economic entity's stockholders' equity attributable to the parent excludes the amount of stockholders' equity which is allocable to that ownership interest in subsidiary equity which is not attributable to the parent (noncontrolling interest, minority interest). This excludes temporary equity and is sometimes called permanent equity.",
        "label": "Stockholders' Equity Attributable to Parent",
        "periodEndLabel": "Ending balance",
        "periodStartLabel": "Beginning balance",
        "totalLabel": "Total stockholders\u2019 equity"
       }
      }
     },
     "localname": "StockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYUnaudited"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Stockholders' Equity Attributable to Parent [Abstract]",
        "terseLabel": "Stockholders\u2019 equity:"
       }
      }
     },
     "localname": "StockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDBALANCESHEETS"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockholdersEquityNoteDisclosureTextBlock": {
     "auth_ref": [
      "r94",
      "r217",
      "r220",
      "r221",
      "r222",
      "r223",
      "r224",
      "r225",
      "r226",
      "r227",
      "r228",
      "r229",
      "r230",
      "r232",
      "r233"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for shareholders' equity comprised of portions attributable to the parent entity and noncontrolling interest, including other comprehensive income. Includes, but is not limited to, balances of common stock, preferred stock, additional paid-in capital, other capital and retained earnings, accumulated balance for each classification of other comprehensive income and amount of comprehensive income.",
        "label": "Stockholders' Equity Note Disclosure [Text Block]",
        "terseLabel": "Equity Transactions"
       }
      }
     },
     "localname": "StockholdersEquityNoteDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactions"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SubsequentEventLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Detail information of subsequent event by type. User is expected to use existing line items from elsewhere in the taxonomy as the primary line items for this disclosure, which is further associated with dimension and member elements pertaining to a subsequent event.",
        "label": "Subsequent Event [Line Items]"
       }
      }
     },
     "localname": "SubsequentEventLineItems",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsequentEventMember": {
     "auth_ref": [
      "r334",
      "r345"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Identifies event that occurred after the balance sheet date but before financial statements are issued or available to be issued.",
        "label": "Subsequent Event [Member]",
        "terseLabel": "Subsequent Event"
       }
      }
     },
     "localname": "SubsequentEventMember",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SubsequentEventTable": {
     "auth_ref": [
      "r334",
      "r345"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Discloses pertinent information about one or more significant events or transactions that occurred after the balance sheet date through the date the financial statements were issued or the date the financial statements were available to be issued.",
        "label": "Subsequent Event [Table]"
       }
      }
     },
     "localname": "SubsequentEventTable",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsequentEventTypeAxis": {
     "auth_ref": [
      "r334",
      "r345"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by event that occurred after the balance sheet date but before financial statements are issued or available to be issued.",
        "label": "Subsequent Event Type [Axis]"
       }
      }
     },
     "localname": "SubsequentEventTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsequentEventTypeDomain": {
     "auth_ref": [
      "r334",
      "r345"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Event that occurred after the balance sheet date but before financial statements are issued or available to be issued.",
        "label": "Subsequent Event Type [Domain]"
       }
      }
     },
     "localname": "SubsequentEventTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SubsequentEventsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Subsequent Events [Abstract]"
       }
      }
     },
     "localname": "SubsequentEventsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsequentEventsTextBlock": {
     "auth_ref": [
      "r344",
      "r347"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for significant events or transactions that occurred after the balance sheet date through the date the financial statements were issued or the date the financial statements were available to be issued. Examples include: the sale of a capital stock issue, purchase of a business, settlement of litigation, catastrophic loss, significant foreign exchange rate changes, loans to insiders or affiliates, and transactions not in the ordinary course of business.",
        "label": "Subsequent Events [Text Block]",
        "terseLabel": "Subsequent Events"
       }
      }
     },
     "localname": "SubsequentEventsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEvents"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SubsidiarySaleOfStockAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of sale of the entity's stock.",
        "label": "Sale of Stock [Axis]",
        "terseLabel": "Sale of Stock"
       }
      }
     },
     "localname": "SubsidiarySaleOfStockAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureNetLossPerShareOutstandingSharesOfCommonStockEquivalentsExcludedFromComputationOfDilutedNetLossPerShareDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureEquityTransactionsAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SupplementalBalanceSheetDisclosuresTextBlock": {
     "auth_ref": [
      "r47"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for supplemental balance sheet disclosures, including descriptions and amounts for assets, liabilities, and equity.",
        "label": "Supplemental Balance Sheet Disclosures [Text Block]",
        "terseLabel": "Balance Sheet Components"
       }
      }
     },
     "localname": "SupplementalBalanceSheetDisclosuresTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureBalanceSheetComponents"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_TypeOfArrangementAxis": {
     "auth_ref": [
      "r304"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Axis]",
        "terseLabel": "Collaborative Arrangement and Arrangement Other than Collaborative"
       }
      }
     },
     "localname": "TypeOfArrangementAxis",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/DisclosureSubsequentEventAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLiabilityRelatedToSaleOfFutureRoyaltiesAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsAdditionalInformationDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfChangesInFairValueOfEquityInvestmentDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsScheduleOfCostSharingPaymentsDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsShareOfCollaborationAndRoyaltyRevenueRelatedToCrysvitaDetails",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureLicenseAndResearchAgreementsTables",
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureRevenueSummaryOfDisaggregationOfTotalRevenuesFromCustomersDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_UseOfEstimates": {
     "auth_ref": [
      "r121",
      "r122",
      "r123",
      "r124",
      "r125",
      "r126",
      "r127"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for the use of estimates in the preparation of financial statements in conformity with generally accepted accounting principles.",
        "label": "Use of Estimates, Policy [Policy Text Block]",
        "terseLabel": "Use of Estimates"
       }
      }
     },
     "localname": "UseOfEstimates",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_WeightedAverageNumberOfShareOutstandingBasicAndDiluted": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Average number of shares or units issued and outstanding that are used in calculating basic and diluted earnings per share (EPS).",
        "label": "Weighted Average Number of Shares Outstanding, Basic and Diluted",
        "terseLabel": "Weighted-average shares used in computing net loss per share, basic and diluted"
       }
      }
     },
     "localname": "WeightedAverageNumberOfShareOutstandingBasicAndDiluted",
     "nsuri": "http://fasb.org/us-gaap/2021-01-31",
     "presentation": [
      "http://www.ultragenyx.com/20220630/taxonomy/role/Role_StatementCONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSUnaudited"
     ],
     "xbrltype": "sharesItemType"
    }
   },
   "unitCount": 5
  }
 },
 "std_ref": {
  "r0": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "105",
   "URI": "http://asc.fasb.org/extlink&oid=124434974&loc=SL124442142-165695"
  },
  "r1": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "205",
   "URI": "http://asc.fasb.org/extlink&oid=109222650&loc=SL51721683-107760"
  },
  "r10": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e7018-107765"
  },
  "r100": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "23",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124436220&loc=d3e21914-107793"
  },
  "r101": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124436220&loc=d3e21930-107793"
  },
  "r102": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124436220&loc=d3e21711-107793"
  },
  "r103": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22499-107794"
  },
  "r104": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(3)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22499-107794"
  },
  "r105": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22694-107794"
  },
  "r106": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22694-107794"
  },
  "r107": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22583-107794"
  },
  "r108": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22595-107794"
  },
  "r109": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22644-107794"
  },
  "r11": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6361739&loc=d3e7789-107766"
  },
  "r110": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22658-107794"
  },
  "r111": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=124431687&loc=d3e22663-107794"
  },
  "r112": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 11.M.Q2)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=122038215&loc=d3e31137-122693"
  },
  "r113": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "60B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=SL5780133-109256"
  },
  "r114": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=125511455&loc=d3e1337-109256"
  },
  "r115": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=124432515&loc=d3e3550-109257"
  },
  "r116": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=124432515&loc=d3e3630-109257"
  },
  "r117": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=109243012&loc=SL65017193-207537"
  },
  "r118": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "260",
   "URI": "http://asc.fasb.org/topic&trid=2144383"
  },
  "r119": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "272",
   "URI": "http://asc.fasb.org/extlink&oid=125520817&loc=d3e70191-108054"
  },
  "r12": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r120": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592"
  },
  "r121": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592"
  },
  "r122": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592"
  },
  "r123": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6161-108592"
  },
  "r124": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6191-108592"
  },
  "r125": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6061-108592"
  },
  "r126": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6132-108592"
  },
  "r127": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6143-108592"
  },
  "r128": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "275",
   "URI": "http://asc.fasb.org/topic&trid=2134479"
  },
  "r129": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8672-108599"
  },
  "r13": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(13))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r130": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r131": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r132": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r133": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r134": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r135": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8736-108599"
  },
  "r136": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r137": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r138": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r139": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8906-108599"
  },
  "r14": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(14))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r140": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "31",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8924-108599"
  },
  "r141": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r142": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r143": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r144": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r145": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e8933-108599"
  },
  "r146": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "40",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9031-108599"
  },
  "r147": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9038-108599"
  },
  "r148": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9038-108599"
  },
  "r149": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "42",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=123359005&loc=d3e9054-108599"
  },
  "r15": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(17))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r150": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=124259787&loc=d3e4428-111522"
  },
  "r151": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=124259787&loc=d3e4531-111522"
  },
  "r152": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 4.E)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=122038336&loc=d3e74512-122707"
  },
  "r153": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=124260329&loc=d3e26610-111562"
  },
  "r154": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=124260329&loc=d3e26853-111562"
  },
  "r155": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=124260329&loc=d3e26626-111562"
  },
  "r156": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27161-111563"
  },
  "r157": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(aa)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27161-111563"
  },
  "r158": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27161-111563"
  },
  "r159": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27161-111563"
  },
  "r16": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(28))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r160": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27161-111563"
  },
  "r161": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27198-111563"
  },
  "r162": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27232-111563"
  },
  "r163": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27290-111563"
  },
  "r164": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27337-111563"
  },
  "r165": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27340-111563"
  },
  "r166": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)-(d)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=123581744&loc=d3e27357-111563"
  },
  "r167": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "320",
   "URI": "http://asc.fasb.org/topic&trid=2196928"
  },
  "r168": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "321",
   "URI": "http://asc.fasb.org/extlink&oid=123583765&loc=SL75117546-209714"
  },
  "r169": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "323",
   "URI": "http://asc.fasb.org/extlink&oid=114001798&loc=d3e33918-111571"
  },
  "r17": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(29))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r170": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=122640432&loc=SL121648383-210437"
  },
  "r171": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4A",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124256539&loc=SL120269210-210444"
  },
  "r172": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5A",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124256539&loc=SL120254536-210444"
  },
  "r173": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8A",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124266218&loc=SL120267834-210445"
  },
  "r174": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255206&loc=SL120267845-210446"
  },
  "r175": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255953&loc=SL82919244-210447"
  },
  "r176": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255953&loc=SL82919253-210447"
  },
  "r177": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255953&loc=SL82919260-210447"
  },
  "r178": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255953&loc=SL82919272-210447"
  },
  "r179": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255953&loc=SL120267966-210447"
  },
  "r18": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r180": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124255953&loc=SL120267969-210447"
  },
  "r181": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "20",
   "Subparagraph": "(SAB Topic 6.M.Q4)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=122651532&loc=SL122037091-237805"
  },
  "r182": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124268681&loc=SL120267897-210452"
  },
  "r183": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13A",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=125515542&loc=SL120267917-210453"
  },
  "r184": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7A",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=125515542&loc=SL120269220-210453"
  },
  "r185": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124258926&loc=SL82898722-210454"
  },
  "r186": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124269663&loc=SL120267853-210455"
  },
  "r187": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124269663&loc=SL120267859-210455"
  },
  "r188": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124269663&loc=SL120267862-210455"
  },
  "r189": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=124269663&loc=SL82922895-210455"
  },
  "r19": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r190": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=99380562&loc=d3e13770-109266"
  },
  "r191": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=120320667&loc=SL49117168-202975"
  },
  "r192": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=6388964&loc=d3e16212-109274"
  },
  "r193": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=6388964&loc=d3e16225-109274"
  },
  "r194": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "((a)(1),(b))",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r195": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)(2)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r196": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r197": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=109226691&loc=d3e2941-110230"
  },
  "r198": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r199": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=121557415&loc=d3e14615-108349"
  },
  "r2": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765"
  },
  "r20": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r200": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(i))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r201": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(ii))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r202": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iii)(A))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r203": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iii))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r204": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iv))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r205": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(5))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442526-122756"
  },
  "r206": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(i))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r207": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(A))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r208": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(B))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r209": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iv))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r21": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(4))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r210": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(5))",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=124359900&loc=SL124442552-122756"
  },
  "r211": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611"
  },
  "r212": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611"
  },
  "r213": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466505&loc=SL123495340-112611"
  },
  "r214": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466204&loc=SL6036836-161870"
  },
  "r215": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "69B",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466577&loc=SL123495735-112612"
  },
  "r216": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "69C",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=123466577&loc=SL123495737-112612"
  },
  "r217": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r218": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r219": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r22": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r220": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r221": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r222": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(i)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r223": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496158-112644"
  },
  "r224": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496171-112644"
  },
  "r225": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496171-112644"
  },
  "r226": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496171-112644"
  },
  "r227": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496180-112644"
  },
  "r228": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496189-112644"
  },
  "r229": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496189-112644"
  },
  "r23": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(31))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r230": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=SL123496189-112644"
  },
  "r231": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=123467817&loc=d3e21463-112644"
  },
  "r232": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.3-04)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=120397183&loc=d3e187085-122770"
  },
  "r233": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "505",
   "URI": "http://asc.fasb.org/topic&trid=2208762"
  },
  "r234": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123360276&loc=SL49130531-203044"
  },
  "r235": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123360276&loc=SL49130532-203044"
  },
  "r236": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130551-203045"
  },
  "r237": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r238": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r239": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r24": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(32))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r240": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r241": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130554-203045"
  },
  "r242": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130556-203045"
  },
  "r243": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130558-203045"
  },
  "r244": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130543-203045"
  },
  "r245": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130545-203045"
  },
  "r246": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130549-203045"
  },
  "r247": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130549-203045"
  },
  "r248": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123351226&loc=SL49130550-203045"
  },
  "r249": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r25": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r250": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r251": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r252": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r253": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r254": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r255": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=123410239&loc=SL49130690-203046-203046"
  },
  "r256": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "606",
   "URI": "http://asc.fasb.org/topic&trid=49130388"
  },
  "r257": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(i)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r258": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(ii)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r259": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(01)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r26": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(b))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r260": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(02)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r261": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(02)(A)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r262": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(02)(B)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r263": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(02)(C)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r264": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(03)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r265": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(n)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920"
  },
  "r266": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=123450688&loc=d3e4179-114921"
  },
  "r267": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "80",
   "Subparagraph": "(a)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=65877416&loc=SL14450702-114947"
  },
  "r268": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "80",
   "Subparagraph": "(d)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=65877416&loc=SL14450657-114947"
  },
  "r269": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "80",
   "Subparagraph": "(f)(3)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=65877416&loc=SL14450657-114947"
  },
  "r27": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(c))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r270": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "80",
   "Subparagraph": "(a)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=65877416&loc=SL14450673-114947"
  },
  "r271": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "80",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=35742348&loc=SL14450788-114948"
  },
  "r272": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=123468992&loc=d3e4534-113899"
  },
  "r273": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=d3e5047-113901"
  },
  "r274": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=d3e5047-113901"
  },
  "r275": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(1)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901"
  },
  "r276": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(1)(i)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901"
  },
  "r277": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=d3e5070-113901"
  },
  "r278": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=120381028&loc=SL79508275-113901"
  },
  "r279": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=121322162&loc=SL121327923-165333"
  },
  "r28": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(7))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r280": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(f)(1)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=121322162&loc=SL121327923-165333"
  },
  "r281": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=121322162&loc=SL121327923-165333"
  },
  "r282": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(g)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=121322162&loc=SL121327923-165333"
  },
  "r283": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 14.F)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=122041274&loc=d3e301413-122809"
  },
  "r284": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=122142933&loc=d3e11149-113907"
  },
  "r285": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=122142933&loc=d3e11178-113907"
  },
  "r286": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "718",
   "URI": "http://asc.fasb.org/topic&trid=2228938"
  },
  "r287": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "730",
   "URI": "http://asc.fasb.org/extlink&oid=6420194&loc=d3e21568-108373"
  },
  "r288": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "730",
   "URI": "http://asc.fasb.org/extlink&oid=6420387&loc=d3e23199-108380"
  },
  "r289": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "730",
   "URI": "http://asc.fasb.org/extlink&oid=6420387&loc=d3e23221-108380"
  },
  "r29": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(8))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r290": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123427490&loc=d3e31917-109318"
  },
  "r291": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123427490&loc=d3e31931-109318"
  },
  "r292": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=121826272&loc=d3e32672-109319"
  },
  "r293": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)(2)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123459177&loc=SL121830611-158277"
  },
  "r294": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)(3)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123459177&loc=SL121830611-158277"
  },
  "r295": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 6.I.7)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817"
  },
  "r296": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=123586238&loc=d3e38679-109324"
  },
  "r297": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=79982066&loc=d3e1392-128463"
  },
  "r298": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=79982066&loc=d3e1486-128463"
  },
  "r299": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "30",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=116859721&loc=d3e6578-128477"
  },
  "r3": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765"
  },
  "r30": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.1)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r300": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "30",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=116859721&loc=d3e6613-128477"
  },
  "r301": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(b)",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=120321790&loc=d3e6927-128479"
  },
  "r302": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "808",
   "URI": "http://asc.fasb.org/extlink&oid=123385629&loc=SL5834089-161433"
  },
  "r303": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "808",
   "URI": "http://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434"
  },
  "r304": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "808",
   "URI": "http://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434"
  },
  "r305": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=116870748&loc=SL6758485-165988"
  },
  "r306": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=116870748&loc=SL6758485-165988"
  },
  "r307": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c),(3)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=109239629&loc=SL4573702-111684"
  },
  "r308": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bb)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=123419778&loc=d3e5710-111685"
  },
  "r309": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=123419778&loc=d3e5710-111685"
  },
  "r31": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.17)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r310": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=125515794&loc=SL5618551-113959"
  },
  "r311": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=125515794&loc=SL5624163-113959"
  },
  "r312": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)(3)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=123482062&loc=SL123482106-238011"
  },
  "r313": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=123482062&loc=SL123482106-238011"
  },
  "r314": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=123874694&loc=d3e19207-110258"
  },
  "r315": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=123874694&loc=d3e19207-110258"
  },
  "r316": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bb)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=123874694&loc=d3e19207-110258"
  },
  "r317": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=123874694&loc=d3e19207-110258"
  },
  "r318": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=123874694&loc=d3e19207-110258"
  },
  "r319": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=123874694&loc=d3e19279-110258"
  },
  "r32": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r320": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=123594809&loc=SL116692626-108610"
  },
  "r321": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=123596393&loc=d3e14064-108612"
  },
  "r322": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=123596393&loc=d3e14172-108612"
  },
  "r323": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=120253306&loc=d3e28129-110885"
  },
  "r324": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "20",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=123602790&loc=d3e30304-110892"
  },
  "r325": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "230",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=123444420&loc=d3e33268-110906"
  },
  "r326": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32022-110900"
  },
  "r327": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32136-110900"
  },
  "r328": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r329": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(b)",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r33": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19-26)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r330": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(c)",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r331": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(d)",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r332": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900"
  },
  "r333": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=6450520&loc=d3e32583-110901"
  },
  "r334": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=6450520&loc=d3e32618-110901"
  },
  "r335": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=124435984&loc=d3e28551-108399"
  },
  "r336": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=124429444&loc=SL124452920-239629"
  },
  "r337": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=123391704&loc=SL77918627-209977"
  },
  "r338": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864"
  },
  "r339": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864"
  },
  "r34": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.20)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r340": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39603-107864"
  },
  "r341": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "852",
   "URI": "http://asc.fasb.org/extlink&oid=124433192&loc=SL2890621-112765"
  },
  "r342": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "852",
   "URI": "http://asc.fasb.org/extlink&oid=124433192&loc=SL2890621-112765"
  },
  "r343": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "852",
   "URI": "http://asc.fasb.org/extlink&oid=84165509&loc=d3e56426-112766"
  },
  "r344": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "855",
   "URI": "http://asc.fasb.org/extlink&oid=6842918&loc=SL6314017-165662"
  },
  "r345": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "855",
   "URI": "http://asc.fasb.org/extlink&oid=6842918&loc=SL6314017-165662"
  },
  "r346": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "855",
   "URI": "http://asc.fasb.org/extlink&oid=6842918&loc=SL6314020-165662"
  },
  "r347": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "855",
   "URI": "http://asc.fasb.org/topic&trid=2122774"
  },
  "r348": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(1)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r349": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(2)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r35": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.21)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r350": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(3)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r351": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(1)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r352": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(2)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r353": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(3)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719"
  },
  "r354": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(1)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719"
  },
  "r355": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(2)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719"
  },
  "r356": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(3)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719"
  },
  "r357": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "910",
   "URI": "http://asc.fasb.org/extlink&oid=123353855&loc=SL119991595-234733"
  },
  "r358": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "730",
   "Topic": "912",
   "URI": "http://asc.fasb.org/extlink&oid=6472174&loc=d3e58812-109433"
  },
  "r359": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 11.L)",
   "Topic": "924",
   "URI": "http://asc.fasb.org/extlink&oid=6472922&loc=d3e499488-122856"
  },
  "r36": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.22(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r360": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "926",
   "URI": "http://asc.fasb.org/extlink&oid=120154696&loc=d3e54445-107959"
  },
  "r361": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-10(c)(3)(ii)(A))",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123726172&loc=d3e511914-122862"
  },
  "r362": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-10(c)(7)(ii))",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123726172&loc=d3e511914-122862"
  },
  "r363": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e61929-109447"
  },
  "r364": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e61929-109447"
  },
  "r365": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e62059-109447"
  },
  "r366": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e62059-109447"
  },
  "r367": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e62395-109447"
  },
  "r368": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e62395-109447"
  },
  "r369": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "33",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e62479-109447"
  },
  "r37": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.24)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r370": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "33",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e62479-109447"
  },
  "r371": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "35A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=SL6807758-109447"
  },
  "r372": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "35A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=SL6807758-109447"
  },
  "r373": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(c)(1)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e61872-109447"
  },
  "r374": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(c)(2)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=123377692&loc=d3e61872-109447"
  },
  "r375": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "940",
   "URI": "http://asc.fasb.org/extlink&oid=123384075&loc=d3e41242-110953"
  },
  "r376": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(1)(a))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r377": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(10)(1))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r378": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(11))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r379": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(23))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r38": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29-31)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r380": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(6))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r381": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.15(5))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120398452&loc=d3e534808-122878"
  },
  "r382": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(15))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r383": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(22))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r384": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(23))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r385": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(26))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260"
  },
  "r386": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "235",
   "Subparagraph": "(SX 210.9-05(b)(2))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=120399901&loc=d3e537907-122884"
  },
  "r387": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "320",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=123599081&loc=d3e62557-112803"
  },
  "r388": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "320",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=123599081&loc=d3e62586-112803"
  },
  "r389": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "360",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=124429447&loc=SL124453093-239630"
  },
  "r39": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r390": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(5))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r391": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(12))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r392": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(2))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r393": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(23)(a)(3))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r394": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(23)(a)(4))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r395": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(25))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r396": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(8))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r397": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.15(a))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400017&loc=d3e572229-122910"
  },
  "r398": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(18))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r399": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(19))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r4": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765"
  },
  "r40": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a)(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r400": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(22))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r401": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(8))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r402": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(9))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263"
  },
  "r403": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4H",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116884468&loc=SL65671331-158438"
  },
  "r404": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Subparagraph": "(d)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124506351&loc=SL117782755-158439"
  },
  "r405": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(a)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124504033&loc=SL117783719-158441"
  },
  "r406": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(b)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124504033&loc=SL117783719-158441"
  },
  "r407": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29F",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124504033&loc=SL117819544-158441"
  },
  "r408": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r409": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)(1)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r41": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r410": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)(2)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r411": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(g)(2)(i)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r412": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(g)(2)(ii)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r413": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(h)(2)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641"
  },
  "r414": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column B)(Footnote 1))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r415": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column B)(Footnote 6))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r416": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column B)(Footnote 7))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r417": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column C)(Footnote 1))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r418": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column C)(Footnote 6))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r419": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column C)(Footnote 7))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r42": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.8)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r420": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column D)(Footnote 1))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r421": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column D)(Footnote 6))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r422": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column D)(Footnote 7))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010"
  },
  "r423": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5D",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-13D(Column B)(Footnote 2))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=SL120429264-123010"
  },
  "r424": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5D",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-13D(Column C)(Footnote 2))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=SL120429264-123010"
  },
  "r425": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-15(Column A))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611379-123010"
  },
  "r426": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-15(Column B))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611379-123010"
  },
  "r427": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-15(Column C))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611379-123010"
  },
  "r428": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-15(Column D))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=122147990&loc=d3e611379-123010"
  },
  "r429": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "310",
   "Subparagraph": "(SX 210.12-29(Footnote 4))",
   "Topic": "948",
   "URI": "http://asc.fasb.org/extlink&oid=120402547&loc=d3e617274-123014"
  },
  "r43": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.9)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682"
  },
  "r430": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "210",
   "Topic": "954",
   "URI": "http://asc.fasb.org/extlink&oid=120413173&loc=SL116631458-115580"
  },
  "r431": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "310",
   "Topic": "954",
   "URI": "http://asc.fasb.org/extlink&oid=123366838&loc=d3e3073-115593"
  },
  "r432": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column B))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r433": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column C))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r434": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column D))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r435": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column E))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r436": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column F))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r437": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column G))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r438": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column H))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r439": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column I))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r44": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=99393222&loc=SL20226024-175313"
  },
  "r440": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Footnote 2))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024"
  },
  "r441": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "310",
   "Subparagraph": "(c)",
   "Topic": "976",
   "URI": "http://asc.fasb.org/extlink&oid=6497875&loc=d3e22274-108663"
  },
  "r442": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "310",
   "Subparagraph": "(b)",
   "Topic": "978",
   "URI": "http://asc.fasb.org/extlink&oid=123360121&loc=d3e27327-108691"
  },
  "r443": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "985",
   "URI": "http://asc.fasb.org/extlink&oid=6501960&loc=d3e128462-111756"
  },
  "r444": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b"
  },
  "r445": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b-2"
  },
  "r446": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "d1-1"
  },
  "r447": {
   "Name": "Form 10-Q",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "308",
   "Subsection": "a"
  },
  "r448": {
   "Name": "Forms 10-K, 10-Q, 20-F",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-1"
  },
  "r449": {
   "Name": "Regulation S-T",
   "Number": "232",
   "Publisher": "SEC",
   "Section": "405"
  },
  "r45": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=99393222&loc=SL20226049-175313"
  },
  "r450": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(a)(3)(iii)(03)",
   "Topic": "848"
  },
  "r46": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=99393222&loc=SL20226052-175313"
  },
  "r47": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "210",
   "URI": "http://asc.fasb.org/topic&trid=2122208"
  },
  "r48": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669646-108580"
  },
  "r49": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a-c)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669646-108580"
  },
  "r5": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765"
  },
  "r50": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669646-108580"
  },
  "r51": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669646-108580"
  },
  "r52": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=d3e637-108580"
  },
  "r53": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=d3e681-108580"
  },
  "r54": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669686-108580"
  },
  "r55": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669619-108580"
  },
  "r56": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669619-108580"
  },
  "r57": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669619-108580"
  },
  "r58": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669625-108580"
  },
  "r59": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=SL7669625-108580"
  },
  "r6": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6801-107765"
  },
  "r60": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124509347&loc=d3e557-108580"
  },
  "r61": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124431353&loc=SL124442407-227067"
  },
  "r62": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124431353&loc=SL124442411-227067"
  },
  "r63": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124431353&loc=SL124452729-227067"
  },
  "r64": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=124507222&loc=d3e1436-108581"
  },
  "r65": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(1))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r66": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(10))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r67": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(20))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r68": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(21))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r69": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(24))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r7": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6812-107765"
  },
  "r70": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.4)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r71": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.7(b))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r72": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.9)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=123367319&loc=SL114868664-224227"
  },
  "r73": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "220",
   "URI": "http://asc.fasb.org/topic&trid=2134417"
  },
  "r74": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3151-108585"
  },
  "r75": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3179-108585"
  },
  "r76": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3179-108585"
  },
  "r77": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3213-108585"
  },
  "r78": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3213-108585"
  },
  "r79": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3213-108585"
  },
  "r8": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6911-107765"
  },
  "r80": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3255-108585"
  },
  "r81": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3255-108585"
  },
  "r82": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3291-108585"
  },
  "r83": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3521-108585"
  },
  "r84": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3536-108585"
  },
  "r85": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3602-108585"
  },
  "r86": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3602-108585"
  },
  "r87": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3602-108585"
  },
  "r88": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123570139&loc=d3e3044-108585"
  },
  "r89": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123431023&loc=d3e4273-108586"
  },
  "r9": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=124098289&loc=d3e6935-107765"
  },
  "r90": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=123431023&loc=SL98516268-108586"
  },
  "r91": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=123372394&loc=d3e18726-107790"
  },
  "r92": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=123372394&loc=d3e18823-107790"
  },
  "r93": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=123372394&loc=d3e18823-107790"
  },
  "r94": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(e)(1))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r95": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(g)(1)(ii))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r96": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r97": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(m)(1)(iii))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r98": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(m)(2)(ii))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690"
  },
  "r99": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "235",
   "URI": "http://asc.fasb.org/topic&trid=2122369"
  }
 },
 "version": "2.1"
}
