{
 "instance": {
  "a2020q110qdocument.htm": {
   "axisCustom": 7,
   "axisStandard": 38,
   "contextCount": 479,
   "dts": {
    "calculationLink": {
     "local": [
      "fhlbsf-20200331_cal.xml"
     ]
    },
    "definitionLink": {
     "local": [
      "fhlbsf-20200331_def.xml"
     ],
     "remote": [
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-eedm-def-2019-01-31.xml",
      "http://xbrl.fasb.org/srt/2019/elts/srt-eedm1-def-2019-01-31.xml"
     ]
    },
    "inline": {
     "local": [
      "a2020q110qdocument.htm"
     ]
    },
    "labelLink": {
     "local": [
      "fhlbsf-20200331_lab.xml"
     ],
     "remote": [
      "https://xbrl.sec.gov/dei/2019/dei-doc-2019-01-31.xml",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-doc-2019-01-31.xml"
     ]
    },
    "presentationLink": {
     "local": [
      "fhlbsf-20200331_pre.xml"
     ]
    },
    "referenceLink": {
     "remote": [
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-ref-2019-01-31.xml",
      "https://xbrl.sec.gov/dei/2019/dei-ref-2019-01-31.xml"
     ]
    },
    "schema": {
     "local": [
      "fhlbsf-20200331.xsd"
     ],
     "remote": [
      "http://xbrl.fasb.org/srt/2019/elts/srt-types-2019-01-31.xsd",
      "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/dtr/type/numeric-2009-12-16.xsd",
      "http://www.xbrl.org/dtr/type/nonNumeric-2009-12-16.xsd",
      "http://www.xbrl.org/2006/ref-2006-02-27.xsd",
      "http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd",
      "http://www.xbrl.org/2005/xbrldt-2005.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-roles-2019-01-31.xsd",
      "http://xbrl.fasb.org/srt/2019/elts/srt-roles-2019-01-31.xsd",
      "https://xbrl.sec.gov/country/2017/country-2017-01-31.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-types-2019-01-31.xsd",
      "http://www.xbrl.org/lrr/arcrole/factExplanatory-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/negated-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/net-2009-12-16.xsd",
      "https://xbrl.sec.gov/currency/2019/currency-2019-01-31.xsd",
      "https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd",
      "https://xbrl.sec.gov/exch/2019/exch-2019-01-31.xsd",
      "http://xbrl.sec.gov/naics/2017/naics-2017-01-31.xsd",
      "http://xbrl.sec.gov/sic/2011/sic-2011-01-31.xsd",
      "https://xbrl.sec.gov/stpr/2018/stpr-2018-01-31.xsd",
      "http://www.xbrl.org/lrr/role/deprecated-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/reference-2009-12-16.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-parts-codification-2019-01-31.xsd"
     ]
    }
   },
   "elementCount": 797,
   "entityCount": 1,
   "hidden": {
    "http://fasb.org/us-gaap/2019-01-31": 21,
    "http://www.fhlbsf.com/20200331": 12,
    "http://xbrl.sec.gov/dei/2019-01-31": 6,
    "total": 39
   },
   "keyCustom": 96,
   "keyStandard": 432,
   "memberCustom": 38,
   "memberStandard": 60,
   "nsprefix": "fhlbsf",
   "nsuri": "http://www.fhlbsf.com/20200331",
   "report": {
    "R1": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:DocumentTransitionReport",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "document",
     "isDefault": "true",
     "longName": "0001000 - Document - Document and Entity Information Document",
     "role": "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument",
     "shortName": "Document and Entity Information Document",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:DocumentTransitionReport",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R10": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2106100 - Disclosure - Recently Issued and Adopted Accounting Guidance",
     "role": "http://www.fhlbsf.com/role/RecentlyIssuedAndAdoptedAccountingGuidance",
     "shortName": "Recently Issued and Adopted Accounting Guidance",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R11": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InvestmentsInDebtAndMarketableEquitySecuritiesAndCertainTradingAssetsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2110100 - Disclosure - Investments (Notes)",
     "role": "http://www.fhlbsf.com/role/InvestmentsNotes",
     "shortName": "Investments (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InvestmentsInDebtAndMarketableEquitySecuritiesAndCertainTradingAssetsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R12": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FederalHomeLoanBankAdvancesTextBlock",
      "reportCount": 1,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2113100 - Disclosure - Advances",
     "role": "http://www.fhlbsf.com/role/Advances",
     "shortName": "Advances",
     "subGroupType": "",
     "uniqueAnchor": null
    },
    "R13": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FinancingReceivablesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2114100 - Disclosure - Mortgage Loans Held for Portfolio",
     "role": "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolio",
     "shortName": "Mortgage Loans Held for Portfolio",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FinancingReceivablesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R14": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DepositLiabilitiesDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2116100 - Disclosure - Deposits",
     "role": "http://www.fhlbsf.com/role/Deposits",
     "shortName": "Deposits",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DepositLiabilitiesDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R15": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2117100 - Disclosure - Consolidated Obligations",
     "role": "http://www.fhlbsf.com/role/ConsolidatedObligations",
     "shortName": "Consolidated Obligations",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R16": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ComprehensiveIncomeNoteTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2119100 - Disclosure - Accumulated Other Comprehensive Income (Loss)",
     "role": "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLoss",
     "shortName": "Accumulated Other Comprehensive Income (Loss)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ComprehensiveIncomeNoteTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R17": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2120100 - Disclosure - Capital",
     "role": "http://www.fhlbsf.com/role/Capital",
     "shortName": "Capital",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R18": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2122100 - Disclosure - Segment Information",
     "role": "http://www.fhlbsf.com/role/SegmentInformation",
     "shortName": "Segment Information",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R19": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2124100 - Disclosure - Derivatives and Hedging Activities",
     "role": "http://www.fhlbsf.com/role/DerivativesAndHedgingActivities",
     "shortName": "Derivatives and Hedging Activities",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R2": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:CashAndDueFromBanks",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1001000 - Statement - Statements of Condition",
     "role": "http://www.fhlbsf.com/role/StatementsOfCondition",
     "shortName": "Statements of Condition",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:InterestBearingDepositsInBanks",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R20": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2128100 - Disclosure - Fair Value",
     "role": "http://www.fhlbsf.com/role/FairValue",
     "shortName": "Fair Value",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R21": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2131100 - Disclosure - Commitments and Contingencies",
     "role": "http://www.fhlbsf.com/role/CommitmentsAndContingencies",
     "shortName": "Commitments and Contingencies",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R22": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RelatedPartyTransactionsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2145100 - Disclosure - Transactions with Certain Members, Certain Nonmembers, and Other FHLBanks",
     "role": "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanks",
     "shortName": "Transactions with Certain Members, Certain Nonmembers, and Other FHLBanks",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RelatedPartyTransactionsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R23": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SubsequentEventsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2147100 - Disclosure - Subsequent Events",
     "role": "http://www.fhlbsf.com/role/SubsequentEvents",
     "shortName": "Subsequent Events",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SubsequentEventsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R24": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CreditLossFinancialInstrumentPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2201201 - Disclosure - Summary of Significant Accounting Policies / Accounting Policies (Policies)",
     "role": "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies",
     "shortName": "Summary of Significant Accounting Policies / Accounting Policies (Policies)",
     "subGroupType": "policies",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CreditLossFinancialInstrumentPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R25": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InvestmentPolicyTextBlock",
      "reportCount": 1,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2205201 - Disclosure - Basis of Presentation (Policies)",
     "role": "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
     "shortName": "Basis of Presentation (Policies)",
     "subGroupType": "policies",
     "uniqueAnchor": null
    },
    "R26": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:TradingSecuritiesAndCertainTradingAssetsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2310301 - Disclosure - Investments (Tables)",
     "role": "http://www.fhlbsf.com/role/InvestmentsTables",
     "shortName": "Investments (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:TradingSecuritiesAndCertainTradingAssetsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R27": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FederalHomeLoanBankAdvancesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2313301 - Disclosure - Advances (Tables)",
     "role": "http://www.fhlbsf.com/role/AdvancesTables",
     "shortName": "Advances (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FederalHomeLoanBankAdvancesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R28": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "fhlbsf:MortgageLoansHeldForPortfolioTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2314301 - Disclosure - Mortgage Loans Held for Portfolio (Tables)",
     "role": "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioTables",
     "shortName": "Mortgage Loans Held for Portfolio (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "fhlbsf:MortgageLoansHeldForPortfolioTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R29": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DepositLiabilitiesTypeTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2316301 - Disclosure - Deposits (Tables)",
     "role": "http://www.fhlbsf.com/role/DepositsTables",
     "shortName": "Deposits (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DepositLiabilitiesTypeTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R3": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "link:footnote",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtSecuritiesAvailableForSaleRestricted",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1001001 - Statement - Statements of Condition (Parenthetical)",
     "role": "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical",
     "shortName": "Statements of Condition (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": null
    },
    "R30": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2317301 - Disclosure - Consolidated Obligations (Tables)",
     "role": "http://www.fhlbsf.com/role/ConsolidatedObligationsTables",
     "shortName": "Consolidated Obligations (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R31": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2319301 - Disclosure - Accumulated Other Comprehensive Income (Loss) (Tables)",
     "role": "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossTables",
     "shortName": "Accumulated Other Comprehensive Income (Loss) (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R32": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2320301 - Disclosure - Capital (Tables)",
     "role": "http://www.fhlbsf.com/role/CapitalTables",
     "shortName": "Capital (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R33": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ReconciliationOfOperatingProfitLossFromSegmentsToConsolidatedTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2322301 - Disclosure - Segment Information (Tables)",
     "role": "http://www.fhlbsf.com/role/SegmentInformationTables",
     "shortName": "Segment Information (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ReconciliationOfOperatingProfitLossFromSegmentsToConsolidatedTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R34": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2324301 - Disclosure - Derivatives and Hedging Activities (Tables)",
     "role": "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesTables",
     "shortName": "Derivatives and Hedging Activities (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R35": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueByBalanceSheetGroupingTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2328301 - Disclosure - Fair Value (Tables)",
     "role": "http://www.fhlbsf.com/role/FairValueTables",
     "shortName": "Fair Value (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueByBalanceSheetGroupingTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R36": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "fhlbsf:OffBalanceSheetCommitmentsTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2331301 - Disclosure - Commitments and Contingencies (Tables)",
     "role": "http://www.fhlbsf.com/role/CommitmentsAndContingenciesTables",
     "shortName": "Commitments and Contingencies (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "fhlbsf:OffBalanceSheetCommitmentsTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R37": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "fhlbsf:TransactionswithCertainMembersandNonmembersTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2345301 - Disclosure - Transactions with Certain Members, Certain Nonmembers, and Other FHLBanks (Tables)",
     "role": "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksTables",
     "shortName": "Transactions with Certain Members, Certain Nonmembers, and Other FHLBanks (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "fhlbsf:TransactionswithCertainMembersandNonmembersTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R38": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "fhlbsf:InterestBearingDepositsSecuritiesPurchasedUnderAgreementstoResellandFederalFundsSoldPercentageUnrated",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410402 - Disclosure - Investments Narrative (Details)",
     "role": "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
     "shortName": "Investments Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "fhlbsf:InterestBearingDepositsSecuritiesPurchasedUnderAgreementstoResellandFederalFundsSoldPercentageUnrated",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R39": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:TradingSecurities",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410403 - Disclosure - Investments Trading Securities by Major Type (Details)",
     "role": "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails",
     "shortName": "Investments Trading Securities by Major Type (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_FinancialInstrumentAxis_us-gaap_USTreasurySecuritiesMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:TradingSecurities",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R4": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:InterestIncomeFederalHomeLoanBankAdvances",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1002000 - Statement - Statements of Income",
     "role": "http://www.fhlbsf.com/role/StatementsOfIncome",
     "shortName": "Statements of Income",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:InterestIncomeDepositsWithFinancialInstitutions",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R40": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410404 - Disclosure - Investments AFS Securities by Major Type (Details)",
     "role": "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
     "shortName": "Investments AFS Securities by Major Type (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:DebtSecuritiesAvailableForSaleAllowanceForCreditLoss",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R41": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfUnrealizedLossOnInvestmentsTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410405 - Disclosure - Investments Summary of AFS Securities with Unrealized Losses (Details)",
     "role": "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails",
     "shortName": "Investments Summary of AFS Securities with Unrealized Losses (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfUnrealizedLossOnInvestmentsTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R42": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:AvailableForSaleDebtSecuritiesAmortizedCostBasis",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410406 - Disclosure - Investments AFS by Contractual Maturity (Details)",
     "role": "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails",
     "shortName": "Investments AFS by Contractual Maturity (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_FinancialInstrumentAxis_fhlbsf_OtherThanMortgageBackedSecuritiesMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R43": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:HeldToMaturitySecuritiesTextBlock",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:HeldToMaturitySecuritiesAmortizedCostBeforeOtherThanTemporaryImpairment",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410407 - Disclosure - Investments Classification of Held-to-Maturity Securities (Details)",
     "role": "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
     "shortName": "Investments Classification of Held-to-Maturity Securities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:HeldToMaturitySecuritiesTextBlock",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:HeldToMaturitySecuritiesAmortizedCostBeforeOtherThanTemporaryImpairment",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R44": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "3",
      "first": true,
      "lang": null,
      "name": "fhlbsf:OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeldAssumptionForMeasurementPrepaymentSpeedWeightedAverage",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410408 - Disclosure - Investments Significant Inputs on PLRMBS (Details)",
     "role": "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails",
     "shortName": "Investments Significant Inputs on PLRMBS (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "3",
      "first": true,
      "lang": null,
      "name": "fhlbsf:OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeldAssumptionForMeasurementPrepaymentSpeedWeightedAverage",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R45": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeld",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410409 - Disclosure - Investments OTTI Rollforward (Details)",
     "role": "http://www.fhlbsf.com/role/InvestmentsOttiRollforwardDetails",
     "shortName": "Investments OTTI Rollforward (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsReductionsCashFlows",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R46": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankAdvancesParValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413402 - Disclosure - Advances (Narrative) (Details)",
     "role": "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
     "shortName": "Advances (Narrative) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "lang": null,
      "name": "fhlbsf:FederalHomeLoanBankAdvanceswithFullprepaymentSymmetryOutstanding",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R47": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankAdvancesMaturitiesSummaryInNextRollingTwelveMonths",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413403 - Disclosure - Advances (Redemption Terms) (Details)",
     "role": "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
     "shortName": "Advances (Redemption Terms) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankAdvancesMaturitiesSummaryInNextRollingTwelveMonths",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R48": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInNextRollingTwelveMonths",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413404 - Disclosure - Advances (Earlier of Contractual Maturity or Next Call/Put Date) (Details)",
     "role": "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails",
     "shortName": "Advances (Earlier of Contractual Maturity or Next Call/Put Date) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInNextRollingTwelveMonths",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R49": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankAdvancesParValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413405 - Disclosure - Advances (Credit and Concentration Risk) (Details)",
     "role": "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
     "shortName": "Advances (Credit and Concentration Risk) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "lang": null,
      "name": "fhlbsf:InterestIncomeNetOfInterestEffectOfDerivativesFederalHomeLoanBankAdvances",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R5": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:NetIncomeLossAttributableToParentNetOfFederalHomeLoanBankAssessments",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1003000 - Statement - Statements of Comprehensive Income",
     "role": "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome",
     "shortName": "Statements of Comprehensive Income",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R50": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankAdvancesFixedRateUnderOneYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413406 - Disclosure - Advances (Interest Rate Payment Terms and Prepayment Fees) (Details)",
     "role": "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails",
     "shortName": "Advances (Interest Rate Payment Terms and Prepayment Fees) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankAdvancesFixedRateUnderOneYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R51": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "fhlbsf:MortgageLoansHeldForPortfolioTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:LoansAndLeasesReceivableBeforeFeesGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2414402 - Disclosure - Mortgage Loans Held for Portfolio (Details)",
     "role": "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails",
     "shortName": "Mortgage Loans Held for Portfolio (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "fhlbsf:MortgageLoansHeldForPortfolioTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:LoansAndLeasesReceivableBeforeFeesGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R52": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:PastDueFinancingReceivablesTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_us-gaap_ConventionalLoanMember",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2414403 - Disclosure - Mortgage Loans Held for Portfolio Delinquency Statistics (Details)",
     "role": "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails",
     "shortName": "Mortgage Loans Held for Portfolio Delinquency Statistics (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:PastDueFinancingReceivablesTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_us-gaap_ConventionalLoanMember",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R53": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "fhlbsf:Housingpriceforecastappreciationoveroneyear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2414404 - Disclosure - Mortgage Loans Held for Portfolio Allowance Narrative (Details)",
     "role": "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails",
     "shortName": "Mortgage Loans Held for Portfolio Allowance Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "fhlbsf:Housingpriceforecastappreciationoveroneyear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R54": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "fhlbsf:ScheduleOfInterestRatePaymentTermsOnDepositLiabilitiesTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:InterestBearingDepositLiabilitiesDomestic",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2416402 - Disclosure - Deposits (Details)",
     "role": "http://www.fhlbsf.com/role/DepositsDetails",
     "shortName": "Deposits (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "fhlbsf:ScheduleOfInterestRatePaymentTermsOnDepositLiabilitiesTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:InterestBearingDepositLiabilitiesDomestic",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R55": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:ObligationWithJointAndSeveralLiabilityArrangementAmountOutstanding",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2417402 - Disclosure - Consolidated Obligations Narrative (Details)",
     "role": "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails",
     "shortName": "Consolidated Obligations Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R56": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "fhlbsf:FederalHomeLoanBankConsolidatedObligationsBondsPar",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2417403 - Disclosure - Consolidated Obligations (Redemption Terms) (Details)",
     "role": "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails",
     "shortName": "Consolidated Obligations (Redemption Terms) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "4",
      "lang": null,
      "name": "fhlbsf:FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInNextTwelveRollingMonths",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R57": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:DerivativeNotionalAmount",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2417404 - Disclosure - Consolidated Obligations (Consolidated Obligation Bonds Noncallable and Callable) (Details)",
     "role": "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails",
     "shortName": "Consolidated Obligations (Consolidated Obligation Bonds Noncallable and Callable) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "fhlbsf:ScheduleOfConsolidatedObligationBondsByCallFeatureTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_fhlbsf_FederalHomeLoanBankConsolidatedObligationOptionFeatureAxis_fhlbsf_NonCallableMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:DebtInstrumentCarryingAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R58": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "fhlbsf:FederalHomeLoanBankConsolidatedObligationsBondsPar",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2417405 - Disclosure - Consolidated Obligations (Consolidated Obligation Bonds by Earlier of Contractual Maturity or Next Call Date) (Details)",
     "role": "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
     "shortName": "Consolidated Obligations (Consolidated Obligation Bonds by Earlier of Contractual Maturity or Next Call Date) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_DebtInstrumentRedemptionPeriodAxis_fhlbsf_EarlierOfContractualMaturityOrNextCallDateMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalInNextRollingTwelveMonths",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R59": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "fhlbsf:FederalHomeLoanBankConsolidatedObligationsDiscountNotesPar",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2417406 - Disclosure - Consolidated Obligations (Consolidated Obligation Discount Notes) (Details)",
     "role": "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails",
     "shortName": "Consolidated Obligations (Consolidated Obligation Discount Notes) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "4",
      "lang": null,
      "name": "us-gaap:ShortTermDebtWeightedAverageInterestRate",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R6": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2018Q4_us-gaap_StatementClassOfStockAxis_us-gaap_CommonClassBMember_us-gaap_StatementEquityComponentsAxis_us-gaap_CommonStockMember",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:SharesIssued",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1004000 - Statement - Statements of Capital Accounts",
     "role": "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
     "shortName": "Statements of Capital Accounts",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2018Q4_us-gaap_StatementClassOfStockAxis_us-gaap_CommonClassBMember_us-gaap_StatementEquityComponentsAxis_us-gaap_CommonStockMember",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:SharesIssued",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R60": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:DebtInstrumentCarryingAmount",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2417407 - Disclosure - Consolidated Obligations (Interest Rate Payment Terms) (Details)",
     "role": "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails",
     "shortName": "Consolidated Obligations (Interest Rate Payment Terms) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_LongtermDebtTypeAxis_fhlbsf_FixedInterestRateMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:DebtInstrumentCarryingAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R61": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:StockholdersEquity",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2419402 - Disclosure - Accumulated Other Comprehensive Income (Loss) (Details)",
     "role": "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
     "shortName": "Accumulated Other Comprehensive Income (Loss) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "us-gaap:ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_InformationByCategoryOfDebtSecurityAxis_us-gaap_AvailableforsaleSecuritiesMember_us-gaap_StatementEquityComponentsAxis_us-gaap_AccumulatedOtherThanTemporaryImpairmentMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:StockholdersEquity",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R62": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankRiskBasedCapitalRequired",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2420402 - Disclosure - Capital (Capital Requirements) (Details)",
     "role": "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails",
     "shortName": "Capital (Capital Requirements) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FederalHomeLoanBankRiskBasedCapitalRequired",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R63": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "ix:continuation",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "0",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinancialInstrumentsSubjectToMandatoryRedemptionNumberOfStockholders1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Institutions",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2420403 - Disclosure - Capital (Mandatorily Redeemable Capital Stock) (Details)",
     "role": "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails",
     "shortName": "Capital (Mandatorily Redeemable Capital Stock) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "ix:continuation",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "0",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinancialInstrumentsSubjectToMandatoryRedemptionNumberOfStockholders1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Institutions",
      "xsiNil": "false"
     }
    },
    "R64": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:MandatorilyRedeemableCapitalStockTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinancialInstrumentsSubjectToMandatoryRedemptionRedeemableWithinOneYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2420404 - Disclosure - Capital (By Redemption Period) (Details)",
     "role": "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails",
     "shortName": "Capital (By Redemption Period) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:MandatorilyRedeemableCapitalStockTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinancialInstrumentsSubjectToMandatoryRedemptionRedeemableWithinOneYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R65": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "fhlbsf:RestrictiononDividendPaymentRatioofMarketValueofCapitaltoParValueofCapitalLessthan70",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2420405 - Disclosure - Capital (Retained Earnings and Dividend Policy) (Details)",
     "role": "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
     "shortName": "Capital (Retained Earnings and Dividend Policy) (Details)",
     "subGroupType": "policies",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "fhlbsf:RestrictiononDividendPaymentRatioofMarketValueofCapitaltoParValueofCapitalLessthan70",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R66": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:SharesSubjectToMandatoryRedemptionSettlementTermsAmount",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2420406 - Disclosure - Capital (Excess Capital Stock) (Details)",
     "role": "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
     "shortName": "Capital (Excess Capital Stock) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R67": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:CapitalUnits",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2420407 - Disclosure - Capital (Concentration) (Details)",
     "role": "http://www.fhlbsf.com/role/CapitalConcentrationDetails",
     "shortName": "Capital (Concentration) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:CapitalUnits",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R68": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "link:footnote",
       "td",
       "tr",
       "table",
       "us-gaap:ReconciliationOfOperatingProfitLossFromSegmentsToConsolidatedTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NumberOfOperatingSegments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "segments",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2422402 - Disclosure - Segment Information (Details)",
     "role": "http://www.fhlbsf.com/role/SegmentInformationDetails",
     "shortName": "Segment Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "link:footnote",
       "td",
       "tr",
       "table",
       "us-gaap:ReconciliationOfOperatingProfitLossFromSegmentsToConsolidatedTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NumberOfOperatingSegments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "segments",
      "xsiNil": "false"
     }
    },
    "R69": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:DerivativeNetLiabilityPositionAggregateFairValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2424402 - Disclosure - Derivatives and Hedging Activities (Narrative) (Details)",
     "role": "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails",
     "shortName": "Derivatives and Hedging Activities (Narrative) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:DerivativeNetLiabilityPositionAggregateFairValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R7": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "4",
      "first": true,
      "lang": null,
      "name": "fhlbsf:DividendsCashAnnualizedRate",
      "reportCount": 1,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1004001 - Statement - Statements of Capital Accounts (Parenthetical)",
     "role": "http://www.fhlbsf.com/role/StatementsOfCapitalAccountsParenthetical",
     "shortName": "Statements of Capital Accounts (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": null
    },
    "R70": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:DerivativeNotionalAmount",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2424403 - Disclosure - Derivatives and Hedging Activities (Derivatives in Statement of Condition) (Details)",
     "role": "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
     "shortName": "Derivatives and Hedging Activities (Derivatives in Statement of Condition) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "link:footnote",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "lang": "en-US",
      "name": "us-gaap:DerivativeLiabilityCollateralRightToReclaimCashOffset",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R71": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:InterestIncomeFederalHomeLoanBankAdvances",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2424404 - Disclosure - Derivatives and Hedging Activities (Derivatives in Statement of Income) (Details)",
     "role": "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails",
     "shortName": "Derivatives and Hedging Activities (Derivatives in Statement of Income) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD_fhlbsf_HedgedItemTypeAxis_fhlbsf_AdvancesMember_us-gaap_DerivativeInstrumentRiskAxis_us-gaap_InterestRateContractMember_us-gaap_IncomeStatementLocationAxis_us-gaap_InterestIncomeMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R72": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfFairValueHedgingInstrumentsStatementsOfFinancialPerformanceAndFinancialPositionLocationTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_BalanceSheetLocationAxis_fhlbsf_AdvancesMember",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:HedgedAssetFairValueHedge",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2424405 - Disclosure - Derivatives and Hedging Activities Cumulative adjustments table (Details)",
     "role": "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails",
     "shortName": "Derivatives and Hedging Activities Cumulative adjustments table (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfFairValueHedgingInstrumentsStatementsOfFinancialPerformanceAndFinancialPositionLocationTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_BalanceSheetLocationAxis_fhlbsf_AdvancesMember",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:HedgedAssetFairValueHedge",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R73": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2424406 - Disclosure - Derivatives and Hedging Activities (Derivatives in Statement of Income and Impact on Interest) (Details)",
     "role": "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
     "shortName": "Derivatives and Hedging Activities (Derivatives in Statement of Income and Impact on Interest) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD_us-gaap_IncomeStatementLocationAxis_us-gaap_GainLossOnDerivativeInstrumentsMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:GainLossOnDerivativeInstrumentsNetPretax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R74": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:DerivativeAssets",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2424407 - Disclosure - Derivatives and Hedging Activities (Offsetting of Derivative Assets and Derivative Liabilities) (Details)",
     "role": "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails",
     "shortName": "Derivatives and Hedging Activities (Offsetting of Derivative Assets and Derivative Liabilities) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R75": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:CashAndDueFromBanks",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2428402 - Disclosure - Fair Value (Carrying Value and Fair Value of Financial Instruments) (Details)",
     "role": "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
     "shortName": "Fair Value (Carrying Value and Fair Value of Financial Instruments) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:FairValueByBalanceSheetGroupingTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_FairValueByMeasurementBasisAxis_us-gaap_CarryingReportedAmountFairValueDisclosureMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:CashAndDueFromBanks",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R76": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_FinancialInstrumentAxis_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:TradingSecurities",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2428403 - Disclosure - Fair Value (Fair Value Measured on Recurring and Nonrecurring Basis) (Details)",
     "role": "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
     "shortName": "Fair Value (Fair Value Measured on Recurring and Nonrecurring Basis) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1_us-gaap_FairValueByFairValueHierarchyLevelAxis_us-gaap_FairValueInputsLevel1Member_us-gaap_FairValueByMeasurementFrequencyAxis_us-gaap_FairValueMeasurementsRecurringMember_us-gaap_FinancialInstrumentAxis_fhlbsf_USTreasurySecuritiesAndUSGovernmentAgenciesDebtSecuritiesMemberDomain",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:TradingSecurities",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R77": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsAdditionsAdditionalCreditLosses",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2428404 - Disclosure - Fair Value (Level 3) (Details)",
     "role": "http://www.fhlbsf.com/role/FairValueLevel3Details",
     "shortName": "Fair Value (Level 3) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2019Q4_us-gaap_FairValueByAssetClassAxis_us-gaap_AvailableforsaleSecuritiesMember_us-gaap_FairValueByFairValueHierarchyLevelAxis_us-gaap_FairValueInputsLevel3Member_us-gaap_FairValueByMeasurementFrequencyAxis_us-gaap_FairValueMeasurementsRecurringMember_us-gaap_FinancialInstrumentAxis_us-gaap_MortgageBackedSecuritiesIssuedByPrivateEnterprisesMember",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R78": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:FairValueOptionQuantitativeDisclosuresTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2019Q4",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:AdvancesFairValueDisclosure",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2428405 - Disclosure - Fair Value (Fair Value Option) (Details)",
     "role": "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
     "shortName": "Fair Value (Fair Value Option) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD_us-gaap_FinancialInstrumentAxis_fhlbsf_AdvancesMember",
      "decimals": "-6",
      "lang": null,
      "name": "fhlbsf:FairValueOptionQuantitativeDisclosuresTransactionsElectedForFairValueOptionAssets",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R79": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:FairValueOptionQuantitativeDisclosuresTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "fhlbsf:FairValueOptionPrincipalBalanceAdvances",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2428406 - Disclosure - Fair Value (Fair Value Difference Between Fair Value and Remaining Contractual Principal Balance Outstanding) (Details)",
     "role": "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
     "shortName": "Fair Value (Fair Value Difference Between Fair Value and Remaining Contractual Principal Balance Outstanding) (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:FairValueOptionQuantitativeDisclosuresTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "fhlbsf:FairValueOptionPrincipalBalanceAdvances",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R8": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:NetIncomeLossAttributableToParentNetOfFederalHomeLoanBankAssessments",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1005000 - Statement - Statements of Cash Flows",
     "role": "http://www.fhlbsf.com/role/StatementsOfCashFlows",
     "shortName": "Statements of Cash Flows",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "lang": null,
      "name": "us-gaap:DepreciationAmortizationAndAccretionNet",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R80": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FI2020Q1",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:ObligationWithJointAndSeveralLiabilityArrangementAmountOutstanding",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2431402 - Disclosure - Commitments and Contingencies Off-Balance Sheet Commitments (Details)",
     "role": "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
     "shortName": "Commitments and Contingencies Off-Balance Sheet Commitments (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "lang": "en-US",
      "name": "fhlbsf:StandbyLettersOfCreditFinalExpiration",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R81": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:ProceedsFromFederalHomeLoanBankBorrowings",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2445402 - Disclosure - Transactions with Certain Members, Certain Nonmembers, and Other FHLBanks (Details)",
     "role": "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails",
     "shortName": "Transactions with Certain Members, Certain Nonmembers, and Other FHLBanks (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": "-6",
      "first": true,
      "lang": null,
      "name": "us-gaap:ProceedsFromFederalHomeLoanBankBorrowings",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R9": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfPresentationAndSignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2105100 - Disclosure - Basis of Presentation (Notes)",
     "role": "http://www.fhlbsf.com/role/BasisOfPresentationNotes",
     "shortName": "Basis of Presentation (Notes)",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "a2020q110qdocument.htm",
      "contextRef": "FD2020Q1YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfPresentationAndSignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    }
   },
   "segmentCount": 126,
   "tag": {
    "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_CoverAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cover page.",
        "label": "Cover [Abstract]"
       }
      }
     },
     "localname": "CoverAbstract",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "fiscalPeriodItemType"
    },
    "dei_DocumentFiscalYearFocus": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This is focus fiscal year of the document report in CCYY 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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "gYearItemType"
    },
    "dei_DocumentPeriodEndDate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The end date of the period reflected on the cover page if a periodic report. For all other reports and registration statements containing historical data, it is the date up through which that historical data is presented.  If there is no historical data in the report, use the filing date. The format of the date is CCYY-MM-DD.",
        "label": "Document Period End Date",
        "terseLabel": "Document Period End Date"
       }
      }
     },
     "localname": "DocumentPeriodEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "dateItemType"
    },
    "dei_DocumentQuarterlyReport": {
     "auth_ref": [
      "r451"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentTransitionReport": {
     "auth_ref": [
      "r452"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "submissionTypeItemType"
    },
    "dei_EntitiesTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Container to assemble all relevant information about each entity associated with the document instance",
        "label": "Entities [Table]",
        "terseLabel": "Entities [Table]"
       }
      }
     },
     "localname": "EntitiesTable",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "stringItemType"
    },
    "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "stateOrProvinceItemType"
    },
    "dei_EntityCentralIndexKey": {
     "auth_ref": [
      "r453"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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": "Common Stock, Shares, Outstanding"
       }
      }
     },
     "localname": "EntityCommonStockSharesOutstanding",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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 [Domain]"
       }
      }
     },
     "localname": "EntityDomain",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "domainItemType"
    },
    "dei_EntityEmergingGrowthCompany": {
     "auth_ref": [
      "r453"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "fileNumberItemType"
    },
    "dei_EntityFilerCategory": {
     "auth_ref": [
      "r453"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "edgarStateCountryItemType"
    },
    "dei_EntityInformationLineItems": {
     "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": "Entity Information [Line Items]",
        "terseLabel": "Entity Information"
       }
      }
     },
     "localname": "EntityInformationLineItems",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "stringItemType"
    },
    "dei_EntityInteractiveDataCurrent": {
     "auth_ref": [
      "r454"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityRegistrantName": {
     "auth_ref": [
      "r453"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityShellCompany": {
     "auth_ref": [
      "r453"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntitySmallBusiness": {
     "auth_ref": [
      "r453"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityTaxIdentificationNumber": {
     "auth_ref": [
      "r453"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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 [Axis]"
       }
      }
     },
     "localname": "LegalEntityAxis",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DocumentAndEntityInformationDocument"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "fhlbsf_ActivityBasedCapitalStockRequirementAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Member's activity based capital stock requirement",
        "label": "Activity Based Capital Stock Requirement [Axis]",
        "terseLabel": "Activity Based Capital Stock Requirement [Axis]"
       }
      }
     },
     "localname": "ActivityBasedCapitalStockRequirementAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_ActivityBasedCapitalStockRequirementDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "[Domain] for Activity Based Capital Stock Requirement [Axis]",
        "label": "Activity Based Capital Stock Requirement [Domain]",
        "terseLabel": "Activity Based Capital Stock Requirement [Domain]"
       }
      }
     },
     "localname": "ActivityBasedCapitalStockRequirementDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_AdjustableInterestRateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial instruments with a variable or adjustable rate of interest.",
        "label": "Adjustable Interest Rate [Member]",
        "terseLabel": "Adjustable Interest Rate [Member]"
       }
      }
     },
     "localname": "AdjustableInterestRateMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_AdvancesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Advances (Loans) by the Federal Home Loan Bank (FHLBank) to member financial institutions. May also include former member financial institutions.",
        "label": "Advances [Member]",
        "terseLabel": "Percentage of Total Advances Outstanding",
        "verboseLabel": "Advances"
       }
      }
     },
     "localname": "AdvancesMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_AdvancesRelatedBusinessMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The operating segment which consists of advances and other credit products, related financing and hedging instruments, liquidity and other non-MBS investments associated with the Bank's role as a liquidity provider, and capital stock.",
        "label": "Advances-Related Business [Member]",
        "terseLabel": "Advances- Related Business"
       }
      }
     },
     "localname": "AdvancesRelatedBusinessMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_AllowanceforCreditLossesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Allowance for Credit Losses [Abstract]",
        "label": "Allowance for Credit Losses [Abstract]"
       }
      }
     },
     "localname": "AllowanceforCreditLossesAbstract",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "xbrltype": "stringItemType"
    },
    "fhlbsf_AltAMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Securities classified as Alt-A, that used alternative procedures in underwriting. Typically classified between prime and subprime in credit quality characteristics.",
        "label": "Alt-A [Member]",
        "verboseLabel": "Alt-A"
       }
      }
     },
     "localname": "AltAMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_AmortizationOfBasisAdjustmentsandGainLossonFairValueHedges": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the amount amortization of FAS 133 basis adjustments deferred during the reporting period for adjusted net interest income purposes only in accordance with the Bank's Retained Earnings and Dividend Policy. Includes gain/loss on fair value hedges.",
        "label": "Amortization Of Basis Adjustments and Gain/Loss on Fair Value Hedges",
        "negatedTerseLabel": "Amortization of Basis Adjustments and Gain/Loss on Fair Value Hedges"
       }
      }
     },
     "localname": "AmortizationOfBasisAdjustmentsandGainLossonFairValueHedges",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_AmountOfExcessStockAndFinancialInstrumentsSubjectToMandatoryRedemptionRepurchasedDuringPeriod": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total amount of excess stock and financial instruments subject to mandatory redemption, which were repurchased during the period.",
        "label": "Amount of Excess Stock and Financial Instruments Subject to Mandatory Redemption, Repurchased During Period",
        "terseLabel": "Amount of Excess Stock Repurchased During Period",
        "verboseLabel": "Amount of Excess Stock and Financial Instruments Subject to Mandatory Redemption, Repurchased During Period"
       }
      }
     },
     "localname": "AmountOfExcessStockAndFinancialInstrumentsSubjectToMandatoryRedemptionRepurchasedDuringPeriod",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_AssetsPledgedAsCollateral": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The carrying amount of assets that serve as collateral for borrowings and to secure credit exposure with derivative counterparties.",
        "label": "Assets Pledged As Collateral",
        "terseLabel": "Assets Pledged As Collateral"
       }
      }
     },
     "localname": "AssetsPledgedAsCollateral",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_AvailableForSaleDebtSecuritiesAndHeldToMaturityDebtSecuritiesExcludingPrivateLabelMortgageBackSecuritiesAmortizedCostPercentageRatedSingleAOrAbove": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage of available for sale debt securities and held-to-maturity debt securities amortized cost, excluding Private Label Mortgage Back Securities, with counterparties rated single-A or above by a nationally recognized statistical rating organization.",
        "label": "Available For Sale Debt Securities And Held To Maturity Debt Securities Excluding Private Label Mortgage Back Securities Amortized Cost Percentage Rated Single A Or Above",
        "terseLabel": "Available For Sale Debt Securities And Held To Maturity Debt Securities Excluding Private Label Mortgage Back Securities Amortized Cost Percentage Rated Single A Or Above"
       }
      }
     },
     "localname": "AvailableForSaleDebtSecuritiesAndHeldToMaturityDebtSecuritiesExcludingPrivateLabelMortgageBackSecuritiesAmortizedCostPercentageRatedSingleAOrAbove",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_AvailableforSaleDebtSecuritiesandHeldtoMaturityDebtSecuritiesPrivateLabelMortgageBackSecuritiesAmortizedCostPercentageRatedSingleAOrAbove": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage of Private Label Mortgage Back Securities classified as available for sale debt securities and held-to-maturity debt securities amortized cost,with counterparties rated single-A or above by a nationally recognized statistical rating organization.",
        "label": "Available-for-Sale Debt Securities and Held-to-Maturity Debt Securities Private Label Mortgage Back Securities Amortized Cost, Percentage Rated Single-A Or Above",
        "terseLabel": "Available-for-Sale Debt Securities and Held-to-Maturity Debt Securities Private Label Mortgage Back Securities Amortized Cost, Percentage Rated Single-A Or Above"
       }
      }
     },
     "localname": "AvailableforSaleDebtSecuritiesandHeldtoMaturityDebtSecuritiesPrivateLabelMortgageBackSecuritiesAmortizedCostPercentageRatedSingleAOrAbove",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_AvailableforsaleSecuritiesDiscounts": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of debt discount in available-for-sale securities that was originally recognized at the issuance of the instrument that has yet to be amortized.",
        "label": "Available for sale Securities Discounts",
        "terseLabel": "Available for sale Securities Discounts"
       }
      }
     },
     "localname": "AvailableforsaleSecuritiesDiscounts",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_AvailableforsaleSecuritiesPremiums": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of debt premium in available-for-sale securities that was originally recognized at the issuance of the instrument that has yet to be amortized.",
        "label": "Available-for-sale Securities, Premiums",
        "terseLabel": "Available-for-sale Securities, Premiums"
       }
      }
     },
     "localname": "AvailableforsaleSecuritiesPremiums",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_BankOfWestMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Bank of the West [Member]",
        "label": "Bank of the West [Member]",
        "terseLabel": "Bank of the West [Member]"
       }
      }
     },
     "localname": "BankOfWestMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_CallableMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A debt obligation not collateralized by pledge, mortgage or other lien in the entity's assets and is callable.",
        "label": "Callable [Member]",
        "terseLabel": "Callable"
       }
      }
     },
     "localname": "CallableMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_CertainMembersAndCertainNonmembersMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Transactions with members and nonmembers: (i) holding more than 10% of the outstanding shares of the Bank's capital stock, including mandatorily redeemable capital stock, at each respective period end, (ii) members that had an officer or director serving on the Bank's Board of Directors at any time during the periods indicated, and (iii) affiliates of the foregoing members and nonmembers.",
        "label": "Certain Members And Certain Nonmembers [Member]",
        "terseLabel": "Certain Members And Certain Nonmembers [Member]"
       }
      }
     },
     "localname": "CertainMembersAndCertainNonmembersMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_Commitmentstopurchasemortgageloansmaximumterm": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Maximum term of the commitments to purchase mortgage loans",
        "label": "Commitments to purchase mortgage loans, maximum term",
        "terseLabel": "Commitments to purchase mortgage loans, maximum term"
       }
      }
     },
     "localname": "Commitmentstopurchasemortgageloansmaximumterm",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "durationStringItemType"
    },
    "fhlbsf_ConsolidatedObligationDiscountNotesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of joint and several obligations consisting of discount notes issued by Federal Home Loan Bank.",
        "label": "Consolidated Obligation, Discount Notes [Member]",
        "terseLabel": "Discount notes",
        "verboseLabel": "Commitments to issue consolidated obligation discount notes, par"
       }
      }
     },
     "localname": "ConsolidatedObligationDiscountNotesMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_ConsolidatedObligationsBondsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of joint and several obligations consisting of discount notes issued by Federal Home Loan Banks (FHLBanks).",
        "label": "Consolidated Obligations, Bonds [Member]",
        "terseLabel": "Consolidated Obligations, Bonds",
        "verboseLabel": "Commitments to issue consolidated obligation bonds, par"
       }
      }
     },
     "localname": "ConsolidatedObligationsBondsMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_CumulativeEffectPeriodofAdoptionAdjustmentMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Increase (decrease) to financial statements for cumulative-effect adjustment in period of adoption of amendment to accounting standards.",
        "label": "Cumulative Effect, Period of Adoption, Adjustment [Member]",
        "terseLabel": "Cumulative Effect, Period of Adoption, Adjustment [Member]"
       }
      }
     },
     "localname": "CumulativeEffectPeriodofAdoptionAdjustmentMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_CumulativeEffectPeriodofAdoptionAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by cumulative-effect adjustment to financial statements in period of adoption of amendment to accounting standards.",
        "label": "Cumulative Effect, Period of Adoption [Axis]",
        "terseLabel": "Cumulative Effect, Period of Adoption [Axis]"
       }
      }
     },
     "localname": "CumulativeEffectPeriodofAdoptionAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_CumulativeEffectPeriodofAdoptionDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "[Domain] for Information by cumulative-effect adjustment to financial statements in period of adoption of amendment to accounting standards.",
        "label": "Cumulative Effect, Period of Adoption [Domain]",
        "terseLabel": "Cumulative Effect, Period of Adoption [Domain]"
       }
      }
     },
     "localname": "CumulativeEffectPeriodofAdoptionDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_CumulativeadjustmentsDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cumulative adjustments Disclosure [Abstract]",
        "label": "Cumulative adjustments Disclosure [Abstract]"
       }
      }
     },
     "localname": "CumulativeadjustmentsDisclosureAbstract",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "xbrltype": "stringItemType"
    },
    "fhlbsf_DebtSecuritiesAvailableforSaleAccruedInterestafterAllowanceforCreditLoss": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of accrued interest 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, Accrued Interest, after Allowance for Credit Loss",
        "terseLabel": "Available-for-Sale, Accrued Interest, after Allowance for Credit Loss"
       }
      }
     },
     "localname": "DebtSecuritiesAvailableforSaleAccruedInterestafterAllowanceforCreditLoss",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_DebtSecuritiesByClassAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debt Securities by Classification as Prime, Alt-A, Option ARM, Alt-A, Other.",
        "label": "Debt Securities by Class [Axis]",
        "terseLabel": "Debt Securities by Class [Axis]"
       }
      }
     },
     "localname": "DebtSecuritiesByClassAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_DebtSecuritiesByClassDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debt Securities by Classification as Prime, Alt-A, Option ARM, Alt-A, Other.",
        "label": "Debt Securities by Class [Domain]",
        "terseLabel": "Debt Securities by Class [Domain]"
       }
      }
     },
     "localname": "DebtSecuritiesByClassDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_DebtSecuritiesHeldtoMaturityAccruedInterestafterAllowanceforCreditLoss": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of accrued interest on investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-Maturity, Accrued Interest, after Allowance for Credit Loss",
        "terseLabel": "Debt Securities, Held-to-Maturity, Accrued Interest, after Allowance for Credit Loss"
       }
      }
     },
     "localname": "DebtSecuritiesHeldtoMaturityAccruedInterestafterAllowanceforCreditLoss",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_DelinquencyStatisticsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Delinquency Statistics [Abstract]",
        "label": "Delinquency Statistics [Abstract]"
       }
      }
     },
     "localname": "DelinquencyStatisticsAbstract",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "xbrltype": "stringItemType"
    },
    "fhlbsf_DepositTypeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information on deposits by deposit type.",
        "label": "Deposit Type [Axis]",
        "terseLabel": "Deposit Type [Axis]"
       }
      }
     },
     "localname": "DepositTypeAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_DepositTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Provides deposit type.",
        "label": "Deposit Type [Domain]",
        "terseLabel": "Deposit Type [Domain]"
       }
      }
     },
     "localname": "DepositTypeDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_DepositsTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of Deposits.",
        "label": "Deposits [Table]",
        "terseLabel": "Deposits [Table]"
       }
      }
     },
     "localname": "DepositsTable",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_DepositswithotherFHLB": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total deposits for MPF and shared expenses with other FHL Banks",
        "label": "Deposits with other FHLB",
        "terseLabel": "Deposits with other FHLB"
       }
      }
     },
     "localname": "DepositswithotherFHLB",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_DerivativeAssetFairValueGrossLiabilityandRightToReclaimCashOffset": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_DerivativeAssets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of asset associated with financial asset or other contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, and right to receive cash collateral under master netting arrangements.",
        "label": "Derivative Asset Fair Value Gross Liability and Right To Reclaim Cash Offset",
        "terseLabel": "Derivative Asset Fair Value Gross Liability and Right To Reclaim Cash Offset"
       }
      }
     },
     "localname": "DerivativeAssetFairValueGrossLiabilityandRightToReclaimCashOffset",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_DerivativeCollateralObligationToReturnSecuritiesThatCanBeSoldOrRepledged": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of obligation to return securities collateral that can be sold or repledged under master netting arrangements that have not been offset against derivative assets.",
        "label": "DerivativeCollateralObligationToReturnSecuritiesThatCanBeSoldOrRepledged",
        "terseLabel": "Derivative Asset, Noncash collateral not offset that can be sold or repledged"
       }
      }
     },
     "localname": "DerivativeCollateralObligationToReturnSecuritiesThatCanBeSoldOrRepledged",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_DerivativeCollateralRightToReclaimSecuritiesThatCanBeSoldOrRepledged": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of right to reclaim securities collateral that cannot be sold or repledged under master netting arrangements that have not been offset against derivative liabilities.",
        "label": "DerivativeCollateralRightToReclaimSecuritiesThatCanBeSoldOrRepledged",
        "terseLabel": "Derivative Liability, Noncash collateral not offset that can be sold or repledged"
       }
      }
     },
     "localname": "DerivativeCollateralRightToReclaimSecuritiesThatCanBeSoldOrRepledged",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_DerivativesCreditPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Derivatives Credit Policy",
        "label": "Derivatives Credit Policy [Policy Text Block]",
        "terseLabel": "Derivatives, Policy",
        "verboseLabel": "Derivatives Credit Policy [Policy Text Block]"
       }
      }
     },
     "localname": "DerivativesCreditPolicyPolicyTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_DividendsCashAnnualizedRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of dividends paid and recorded during the period, including dividends on mandatorily redeemable capital stock, annualized rate. The FHLBank of San Francisco\u2019s (Bank) Board of Directors amended the Bank\u2019s Excess Stock Repurchase, Retained Earnings, and Dividend Framework and was approved to include the Bank\u2019s new dividend philosophy to endeavor to pay a quarterly dividend at an annualized rate between 5% and 7%, which was intended to be considered by the Bank\u2019s Board of Directors beginning with the Bank\u2019s second quarter 2017 dividend declaration. The decision to declare any dividend and the dividend rate are at the discretion of the Bank\u2019s Board of Directors, which may choose to follow the dividend philosophy as guidance in the dividend declaration.",
        "label": "Dividends, Cash, Annualized Rate",
        "terseLabel": "Dividends, Cash, Annualized Rate",
        "verboseLabel": "Annualized Dividend Rate on Capital Stock"
       }
      }
     },
     "localname": "DividendsCashAnnualizedRate",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccountsParenthetical"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_DividendsCashDeclaredAnnualizedRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of dividends declared, annualized rate.",
        "label": "Dividends, Cash Declared, Annualized Rate",
        "terseLabel": "Dividends, Cash Declared, Annualized Rate"
       }
      }
     },
     "localname": "DividendsCashDeclaredAnnualizedRate",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_EarlierOfContractualMaturityOrNextCallDateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Long-term debt by maturity type, using earlier of contractual maturity or next call date.",
        "label": "Earlier of Contractual Maturity or Next Call Date [Member]",
        "terseLabel": "Earlier of Contractual Maturity or Next Call Date [Member]"
       }
      }
     },
     "localname": "EarlierOfContractualMaturityOrNextCallDateMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_ExcessCapitalStockAndExcessMandatorilyRedeemableCapitalStockRedemptionPeriodOfWrittenNotice": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Period of written notice to repurchase shareholder excess capital stock and excess mandatorily redeemable capital stock.",
        "label": "Excess Capital Stock and Excess Mandatorily Redeemable Capital Stock, Redemption, Period of Written Notice",
        "terseLabel": "Excess Capital Stock and Excess Mandatorily Redeemable Capital Stock, Redemption, Period of Written Notice"
       }
      }
     },
     "localname": "ExcessCapitalStockAndExcessMandatorilyRedeemableCapitalStockRedemptionPeriodOfWrittenNotice",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "fhlbsf_ExcessCapitalToAssets": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Excess Capital to Assets",
        "label": "Excess Capital to Assets",
        "terseLabel": "Excess Capital to Assets"
       }
      }
     },
     "localname": "ExcessCapitalToAssets",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_FairValueDisclosureOffBalanceSheetRisksFaceAmountExpiringAfterOneYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FairValueDisclosureOffbalanceSheetRisksFaceAmountLiability",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The face amount of financial liabilities, which are not recognized in the financial statements (off-balance sheet) because they fail to meet some other criterion for recognition, which expire after one year of the balance sheet date.",
        "label": "Fair Value Disclosure, Off-balance Sheet Risks, Face Amount, Expiring After One Year",
        "terseLabel": "Expire After One Year"
       }
      }
     },
     "localname": "FairValueDisclosureOffBalanceSheetRisksFaceAmountExpiringAfterOneYear",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueDisclosureOffBalanceSheetRisksFaceAmountExpiringWithinOneYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FairValueDisclosureOffbalanceSheetRisksFaceAmountLiability",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The face amount of financial liabilities, which are not recognized in the financial statements (off-balance sheet) because they fail to meet some other criterion for recognition, which expire within one year of the balance sheet date.",
        "label": "Fair Value Disclosure, Off-balance Sheet Risks, Face Amount, Expiring Within One Year",
        "terseLabel": "Expire Within One Year"
       }
      }
     },
     "localname": "FairValueDisclosureOffBalanceSheetRisksFaceAmountExpiringWithinOneYear",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueMeasurementwithUnobservableInputsReconciliationRecurringBasisAssetTransfersfromheldtomaturityintoavailableforsalesecurities": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of transfer of financial instrument classified as an asset from held to maturity into available for sale securities.",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset Transfers from held-to-maturity into available-for-sale securities",
        "terseLabel": "Transfers of HTM to AFS"
       }
      }
     },
     "localname": "FairValueMeasurementwithUnobservableInputsReconciliationRecurringBasisAssetTransfersfromheldtomaturityintoavailableforsalesecurities",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionAggregateDifferencesConsolidatedObligationBonds": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents the gain (loss) brought about by the difference between the aggregate fair value and the aggregate unpaid principal balance of consolidated obligation bonds that have contractual principal amounts and for which the fair value option has been elected.",
        "label": "Fair Value, Option, Aggregate Differences, Consolidated Obligation Bonds",
        "negatedTerseLabel": "Fair value option valuation adjustments"
       }
      }
     },
     "localname": "FairValueOptionAggregateDifferencesConsolidatedObligationBonds",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionPrincipalBalanceAdvances": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the outstanding amount of the unpaid principal balance of Federal Home Loan Bank Advances for which the fair value option has been elected.",
        "label": "Fair Value Option, Principal Balance, Advances",
        "terseLabel": "Fair Value Option, Principal Balance, Advances"
       }
      }
     },
     "localname": "FairValueOptionPrincipalBalanceAdvances",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionPrincipalBalanceConsolidatedObligationBonds": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the outstanding amount of the unpaid principal balance of consolidated obligation bonds for which the fair value option has been elected.",
        "label": "Fair Value Option, Principal Balance, Consolidated Obligation Bonds",
        "terseLabel": "Fair Value Option, Principal Balance, CO Bonds"
       }
      }
     },
     "localname": "FairValueOptionPrincipalBalanceConsolidatedObligationBonds",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionQuantitativeDisclosuresChangeInAccruedInterestAssets": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Change in accrued interest during the reporting period of assets measured under the fair value option.",
        "label": "Fair Value Option, Quantitative Disclosures, Change in Accrued Interest, Assets",
        "terseLabel": "Change in accrued interest"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresChangeInAccruedInterestAssets",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionQuantitativeDisclosuresChangeInAccruedInterestLiabilities": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Change in accrued interest during the reporting period of liabilities measured under the fair value option.",
        "label": "Fair Value Option, Quantitative Disclosures, Change in Accrued Interest, Liabilities",
        "terseLabel": "Change in accrued interest"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresChangeInAccruedInterestLiabilities",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionQuantitativeDisclosuresMaturitiesAndTerminationsAssets": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Maturities and terminations during the reporting period of assets measured under the fair value option.",
        "label": "Fair Value Option, Quantitative Disclosures, Maturities and Terminations, Assets",
        "negatedLabel": "Maturities and terminations"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresMaturitiesAndTerminationsAssets",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionQuantitativeDisclosuresMaturitiesAndTerminationsLiabilities": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Maturities and terminations during the reporting period of liabilities measured under the fair value option.",
        "label": "Fair Value Option, Quantitative Disclosures, Maturities and Terminations, Liabilities",
        "negatedLabel": "Maturities and terminations"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresMaturitiesAndTerminationsLiabilities",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionQuantitativeDisclosuresTransactionsElectedForFairValueOptionAssets": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "New asset transactions that were elected for fair value option during the reporting period.",
        "label": "Fair Value, Option, Quantitative Disclosures, Transactions Elected for Fair Value Option, Assets",
        "terseLabel": "New transactions elected for fair value option"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresTransactionsElectedForFairValueOptionAssets",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FairValueOptionQuantitativeDisclosuresTransactionsElectedForFairValueOptionLiabilities": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "New liability transactions that were elected for fair value option during the reporting period.",
        "label": "Fair Value, Option, Quantitative Disclosures, Transactions Elected for Fair Value Option, Liabilities",
        "terseLabel": "New transactions elected for fair value option"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresTransactionsElectedForFairValueOptionLiabilities",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FederalFundsSoldFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value as of the balance sheet date of funds lent to other depository institutions, securities brokers, or securities dealers in the form of Federal Funds sold",
        "label": "Federal Funds Sold, Fair Value Disclosure",
        "terseLabel": "Federal funds sold"
       }
      }
     },
     "localname": "FederalFundsSoldFairValueDisclosure",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FederalFundsSoldMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Federal Funds Sold",
        "label": "Federal Funds Sold [Member]",
        "terseLabel": "Fed Funds Sold"
       }
      }
     },
     "localname": "FederalFundsSoldMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_FederalHomeLoanBankAdvancesByBorrowerAndAffiliateAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Federal Home Loan Bank Advances by borrower and affiliate.",
        "label": "Federal Home Loan Bank Advances by Borrower and Affiliate [Axis]",
        "terseLabel": "Federal Home Loan Bank Advances by Borrower and Affiliate [Axis]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesByBorrowerAndAffiliateAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_FederalHomeLoanBankAdvancesByBorrowerAndAffiliateDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Federal Home Loan Bank Advances by borrower and affiliate.",
        "label": "Federal Home Loan Bank Advances by Borrower and Affiliate [Domain]",
        "terseLabel": "Federal Home Loan Bank Advances by Borrower and Affiliate"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesByBorrowerAndAffiliateDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_FederalHomeLoanBankAdvancesFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Federal Home Loan Bank Advances, Fair Value Disclosure",
        "label": "Federal Home Loan Bank Advances, Fair Value Disclosure",
        "terseLabel": "Advances"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFairValueDisclosure",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FederalHomeLoanBankAdvancesPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for borrowing from the Federal Home Loan Bank, including: (i) general description; (ii) title and nature of obligation; (iii) interest rate; (iv) payment terms; (v) maturity dates by year; (vi) collateral requirements; (vii) restrictive covenants; (viii) priority; (ix) conversion or redemption features; (x) carrying value of assets pledged as collateral; (xi) combined aggregate maturities for next five years; (xii) unused or available balances; (xiii) prepayment fees.",
        "label": "Federal Home Loan Bank Advances, Policy [Policy Text Block]",
        "terseLabel": "Federal Home Loan Bank Advances, Policy [Policy Text Block]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesPolicyPolicyTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_FederalHomeLoanBankAdvancesWithPartialPrepaymentSymmetryOutstanding": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of Federal Home Loan Bank advances with partial prepayment symmetry outstanding as of the latest balance sheet date. Repayment of advances with partial prepayment symmetry may result in a payment or receipt of a prepayment, depending upon circumstances, such as movements in interest rates.",
        "label": "Federal Home Loan Bank Advances With Partial Prepayment Symmetry Outstanding",
        "terseLabel": "Advances With Partial Prepayment Symmetry Outstanding"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWithPartialPrepaymentSymmetryOutstanding",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FederalHomeLoanBankAdvanceswithFullprepaymentSymmetryOutstanding": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of Federal Home Loan Bank advances with full prepayment symmetry outstanding as of the latest balance sheet date. Repayment of advances with full prepayment symmetry may result in  a payment or receipt of a prepayment, depending upon circumstances, such as movements in interest rates.",
        "label": "Federal Home Loan Bank Advances with Full prepayment Symmetry Outstanding",
        "terseLabel": "Federal Home Loan Bank Advances with Full prepayment Symmetry Outstanding"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvanceswithFullprepaymentSymmetryOutstanding",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationOptionFeatureAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information about specific consolidated obligations option features reported by the Federal Home Loan Bank.",
        "label": "Federal Home Loan Bank, Consolidated Obligation Option Feature [Axis]",
        "terseLabel": "Debt Instrument Option Feature [Axis]"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationOptionFeatureAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationOptionFeatureDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Provides general categories of debt call features for which information is required or determined to be disclosed.",
        "label": "Federal Home Loan Bank, Consolidated Obligation Option Feature [Domain]",
        "terseLabel": "Debt Instrument Option Feature [Domain]"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationOptionFeatureDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsAdjustmentforHedgingActivities": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of unrealized gain (loss) recognized in earnings for the cumulative period of the debt obligation in a fair value hedge, as offset by the gain (loss) on the hedging instrument to the extent that the fair value hedge is determined to be effective.",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds, Adjustment for Hedging Activities",
        "terseLabel": "Valuation adjustments for hedging activities"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBondsAdjustmentforHedgingActivities",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsPar": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par value of the amount of joint and several obligations consisting of bonds issued by Federal Home Loan Banks (FHLBanks).",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds, Par",
        "terseLabel": "Total bonds, par value",
        "totalLabel": "Total par value"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBondsPar",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingAfterRollingYearFive": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate for the Bank portion of joint and several obligations consisting of bonds issued by Federal Home Loan Bank (FHLBank) maturing after the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds, Weighted Average Interest Rate, Maturing After Rolling Year Five",
        "terseLabel": "After 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingAfterRollingYearFive",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInNextTwelveRollingMonths": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate for the Bank portion of joint and several obligations consisting of bonds issued by Federal Home Loan Bank (FHLBank) maturing in the next rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds, Weighted Average Interest Rate, Maturing In Next Twelve Rolling Months",
        "terseLabel": "Within 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInNextTwelveRollingMonths",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInRollingYearFive": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate for the Bank portion of joint and several obligations consisting of bonds issued by Federal Home Loan Bank (FHLBank) maturing in the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds, Weighted Average Interest Rate, Maturing In Rolling Year Five",
        "terseLabel": "After 4 years through 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInRollingYearFive",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInRollingYearFour": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate for the Bank portion of joint and several obligations consisting of bonds issued by Federal Home Loan Bank (FHLBank) maturing in the fourth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds, Weighted Average Interest Rate, Maturing In Rolling Year Four",
        "terseLabel": "After 3 years through 4 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInRollingYearFour",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInRollingYearThree": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate for the Bank portion of joint and several obligations consisting of bonds issued by Federal Home Loan Bank (FHLBank) maturing in the second rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds, Weighted Average Interest Rate, Maturing In Rolling Year Three",
        "terseLabel": "After 2 years through 3 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInRollingYearThree",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInRollingYearTwo": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate for the Bank portion of joint and several obligations consisting of bonds issued by Federal Home Loan Bank (FHLBank) maturing in the second rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds, Weighted Average Interest Rate, Maturing In Rolling Year Two",
        "terseLabel": "After 1 year through 2 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBondsWeightedAverageInterestRateMaturingInRollingYearTwo",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsCallableOptionMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Right, but not the obligation, the Federal Home Loan Bank has to return the loan to the issuer at par without a prepayment penalty.",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Callable Option [Member]",
        "terseLabel": "Consolidated Obligations, Callable Option [Member]"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsCallableOptionMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsDiscountNotesPar": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par value of the amount of joint and several obligations consisting of discount notes issued by Federal Home Loan Banks (FHLBanks).",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Discount Notes, Par",
        "terseLabel": "Discount notes, par value"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsDiscountNotesPar",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FederalHomeLoanBankConsolidatedObligationsFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of Amount of joint and several obligations consisting of consolidated obligation bonds and discount notes issued by Federal Home Loan Banks (FHLBanks).",
        "label": "Federal Home Loan Bank, Consolidated Obligations Fair Value Disclosure",
        "verboseLabel": "Total consolidated obligations"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsFairValueDisclosure",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FhlbanksMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents all 11 Federal Home Loan Banks.",
        "label": "FHLBanks [Member]",
        "terseLabel": "FHLBanks [Member]"
       }
      }
     },
     "localname": "FhlbanksMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_FinancialAssetAmortizedCostAccruedInterestafterAllowanceforCreditLoss": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of accrued interest on financial asset measured at amortized cost.",
        "label": "Financial Asset, Amortized Cost, Accrued Interest, after Allowance for Credit Loss",
        "terseLabel": "Accrued Interest, after Allowance for Credit Loss"
       }
      }
     },
     "localname": "FinancialAssetAmortizedCostAccruedInterestafterAllowanceforCreditLoss",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FinancialInstrumentsSubjectToMandatoryRedemptionRepurchaseOfExcessMandatorilyRedeemableCapitalStock": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial Instruments Subject to Mandatory Redemption, Repurchase of Excess Mandatorily Redeemable Capital Stock. The cash outflow related to equity securities that embody an unconditional obligation requiring the issuer to redeem the securities by transferring the assets at a specified or determinable date (or dates) that is (or are) initially more than one year (or the normal operating cycle, if longer) from the issuance date, or upon an event that is certain to occur beyond one year (or the normal operating cycle, if longer) from the issuance date.",
        "label": "Financial Instruments Subject to Mandatory Redemption, Repurchase of Excess Mandatorily Redeemable Capital Stock",
        "terseLabel": "Repurchase of excess mandatorily redeemable capital stock"
       }
      }
     },
     "localname": "FinancialInstrumentsSubjectToMandatoryRedemptionRepurchaseOfExcessMandatorilyRedeemableCapitalStock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FinancingReceivableAccruedInterestafterAllowanceforCreditLoss": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of accrued interest on financing receivable.",
        "label": "Financing Receivable, Accrued Interest, after Allowance for Credit Loss",
        "terseLabel": "Accrued Interest Receivable"
       }
      }
     },
     "localname": "FinancingReceivableAccruedInterestafterAllowanceforCreditLoss",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FinancingReceivableOriginatedCurrentFiscalYearandPreceedingFourPreceedingFiscalYears": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of financing receivable originated in current fiscal year and preceeding four fiscal years.",
        "label": "Financing Receivable, Originated, Current Fiscal Year and Preceeding Four Preceeding Fiscal Years",
        "terseLabel": "Originated, Current Fiscal Year and Preceeding Four Preceeding Fiscal Years"
       }
      }
     },
     "localname": "FinancingReceivableOriginatedCurrentFiscalYearandPreceedingFourPreceedingFiscalYears",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_FirstRepublicBankMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "First Republic Bank [Member]",
        "label": "First Republic Bank [Member]",
        "terseLabel": "First Republic Bank [Member]"
       }
      }
     },
     "localname": "FirstRepublicBankMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_FixedInterestRateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial instruments with a fixed rate of interest.",
        "label": "Fixed Interest Rate [Member]",
        "terseLabel": "Fixed Interest Rate [Member]"
       }
      }
     },
     "localname": "FixedInterestRateMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails",
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_GainlossonFairValueHedgesRecognizedinNetInterestIncome": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total amount of gain (loss) derived from fair value hedges recognized in net interest income in the period.",
        "label": "Gain (loss) on Fair Value Hedges Recognized in Net Interest Income",
        "verboseLabel": "Gain (loss) on Fair Value Hedges Recognized in Net Interest Income"
       }
      }
     },
     "localname": "GainlossonFairValueHedgesRecognizedinNetInterestIncome",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_HedgedAssetActiveFairValueHedgeCumulativeIncreaseDecrease": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cumulative increase (decrease) in fair value of hedged asset in fair value hedge, attributable to hedged risk, active as of the balance sheet date.",
        "label": "Hedged Asset Active Fair Value Hedge Cumulative Increase Decrease",
        "terseLabel": "Basis Adjustment for Active Fair Value Hedged Asset Cumulative Increase Decrease"
       }
      }
     },
     "localname": "HedgedAssetActiveFairValueHedgeCumulativeIncreaseDecrease",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_HedgedItemTypeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The name that identifies a derivative or a group of derivatives, by type of hedged item.",
        "label": "Hedged Item Type [Axis]",
        "terseLabel": "Hedged Item Type [Axis]"
       }
      }
     },
     "localname": "HedgedItemTypeAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_HedgedItemTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The name that identifies a derivative or a group of derivatives, by type of hedged item.",
        "label": "Hedged Item Type [Domain]",
        "terseLabel": "Hedged Item Type [Domain]"
       }
      }
     },
     "localname": "HedgedItemTypeDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_HedgedLiabilityActiveFairValueHedgeCumulativeIncreaseDecrease": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cumulative increase (decrease) in fair value of hedged liability in fair value hedge, attributable to hedged risk,  active as of the balance sheet date.",
        "label": "Hedged Liability Active Fair Value Hedge Cumulative Increase Decrease",
        "terseLabel": "Basis Adjustment for Active Fair Value Hedged Liability Cumulative Increase Decrease"
       }
      }
     },
     "localname": "HedgedLiabilityActiveFairValueHedgeCumulativeIncreaseDecrease",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_HeldToMaturitySecuritiesDiscounts": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of debt discount in held-to-maturity securities that was originally recognized at the issuance of the instrument that has yet to be amortized.",
        "label": "Held-to-maturity Securities, Discounts",
        "terseLabel": "Held-to-maturity Securities, Discounts"
       }
      }
     },
     "localname": "HeldToMaturitySecuritiesDiscounts",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_HeldToMaturitySecuritiesPremiums": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of debt premium in held-to-maturity securities that was originally recognized at the issuance of the instrument that has yet to be amortized.",
        "label": "Held-to-maturity Securities, Premiums",
        "terseLabel": "Held-to-maturity Securities, Premiums"
       }
      }
     },
     "localname": "HeldToMaturitySecuritiesPremiums",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_Housingpriceforecastappreciationoverlongterm": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Housing price forecast appreciation over long term",
        "label": "Housing price forecast appreciation over long term",
        "terseLabel": "Housing price forecast appreciation over three year horizon"
       }
      }
     },
     "localname": "Housingpriceforecastappreciationoverlongterm",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_Housingpriceforecastappreciationoveroneyear": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Housing price forecast appreciation over one year",
        "label": "Housing price forecast appreciation over one year",
        "terseLabel": "Housing price forecast appreciation over one year horizon"
       }
      }
     },
     "localname": "Housingpriceforecastappreciationoveroneyear",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_IncomeExpenseEconomicHedges": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Net income/ (expense) associated with economic hedges (derivative instruments not designated as a hedging instrument) included in other income during the reporting period.",
        "label": "Income/Expense, Economic Hedges",
        "negatedTerseLabel": "Income/(Expense) on Economic Hedges"
       }
      }
     },
     "localname": "IncomeExpenseEconomicHedges",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_InterestBearingDepositsSecuritiesPurchasedUnderAgreementstoResellandFederalFundsSoldPercentageRatedBelowTripleB": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage of short-term investments in interest-bearing deposits, securities purchased under agreements to resell, and federal funds sold assets with counterparties rated below triple-B by a nationally recognized statistical rating organization.",
        "label": "Interest-Bearing Deposits, Securities Purchased Under Agreements to Resell, and Federal Funds Sold, Percentage Rated Below Triple-B",
        "terseLabel": "Interest-Bearing Deposits, Securities Purchased Under Agreements to Resell, and Federal Funds Sold, Percentage Rated Below Triple-B"
       }
      }
     },
     "localname": "InterestBearingDepositsSecuritiesPurchasedUnderAgreementstoResellandFederalFundsSoldPercentageRatedBelowTripleB",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_InterestBearingDepositsSecuritiesPurchasedUnderAgreementstoResellandFederalFundsSoldPercentageUnrated": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percent of short-term investments in interest-bearing deposits, securities purchased under agreements to resell, and federal funds sold assets with counterparties unrated by a nationally recognized statistical rating organization.",
        "label": "Interest-Bearing Deposits, Securities Purchased Under Agreements to Resell, and Federal Funds Sold, Percentage Unrated",
        "terseLabel": "Interest-Bearing Deposits, Securities Purchased Under Agreements to Resell, and Federal Funds Sold, Percentage Unrated"
       }
      }
     },
     "localname": "InterestBearingDepositsSecuritiesPurchasedUnderAgreementstoResellandFederalFundsSoldPercentageUnrated",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_InterestBearingDepositsSecuritiesPurchasedunderAgreementstoResellandFedFundsSoldAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest Bearing Deposits, Securities Purchased under Agreements to Resell, and Fed Funds Sold [Abstract]",
        "label": "Interest Bearing Deposits, Securities Purchased under Agreements to Resell, and Fed Funds Sold [Abstract]"
       }
      }
     },
     "localname": "InterestBearingDepositsSecuritiesPurchasedunderAgreementstoResellandFedFundsSoldAbstract",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "xbrltype": "stringItemType"
    },
    "fhlbsf_InterestIncomeNetOfInterestEffectOfDerivativesFederalHomeLoanBankAdvances": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest income, net of interest effect of derivatives, on Federal Home Loan Bank Advances.",
        "label": "Interest Income, Net of Interest Effect of Derivatives, Federal Home Loan Bank Advances",
        "terseLabel": "Interest Income from Advances"
       }
      }
     },
     "localname": "InterestIncomeNetOfInterestEffectOfDerivativesFederalHomeLoanBankAdvances",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_InterestRateCapsandFloorsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract in which the cap writer, in return for a premium, agrees to limit, or cap, the cap holder's risk associated with an increase in interest rates or in which the floor writer, in return for a premium, agrees to limit the risk associated with a decline in interest rates based on a notional amount.",
        "label": "Interest Rate Caps and Floors [Member]",
        "terseLabel": "Interest Rate Caps and Floors [Member]",
        "verboseLabel": "Interest rate caps and floors"
       }
      }
     },
     "localname": "InterestRateCapsandFloorsMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_InterestRatePaymentTermByInterestRateTypeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information on interest rate payment terms by interest rate type.",
        "label": "Interest Rate Payment Term By Interest Rate Type [Axis]",
        "terseLabel": "Interest Rate Payment Term By Interest Rate Type [Axis]"
       }
      }
     },
     "localname": "InterestRatePaymentTermByInterestRateTypeAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_InterestRateTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Provides interest rate payment terms.",
        "label": "Interest Rate Type [Domain]",
        "terseLabel": "Interest Rate Type [Domain]"
       }
      }
     },
     "localname": "InterestRateTypeDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_InterestbearingDepositsFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value disclosure for banks and other depository institutions (including Federal Reserve Banks, if applicable): Interest-bearing deposits in other financial institutions for relatively short periods of time including, for example, certificates of deposits, which are presented separately from cash on the balance sheet",
        "label": "Interest-bearing Deposits, Fair Value Disclosure",
        "terseLabel": "Interest-bearing deposits"
       }
      }
     },
     "localname": "InterestbearingDepositsFairValueDisclosure",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_InvestmentsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "[Line Items] for Investments [Table]",
        "label": "Investments [Line Items]",
        "terseLabel": "Investments [Line Items]"
       }
      }
     },
     "localname": "InvestmentsLineItems",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_InvestmentsTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Investments [Table]",
        "label": "Investments [Table]",
        "terseLabel": "Investments [Table]"
       }
      }
     },
     "localname": "InvestmentsTable",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_IssuerOfInvestmentsAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Issuer of investments",
        "label": "Issuer Of Investments [Axis]",
        "terseLabel": "Issuer Of Investments [Axis]"
       }
      }
     },
     "localname": "IssuerOfInvestmentsAxis",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_IssuerOfInvestmentsDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "[Domain] for Issuer of investments",
        "label": "IssuerOfInvestments [Domain]",
        "terseLabel": "Issuer Of Investments [Domain]"
       }
      }
     },
     "localname": "IssuerOfInvestmentsDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_JpmorganChaseBankNationalAssociationMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "JPMorgan Chase Bank National Association [Member]",
        "label": "JPMorgan Chase Bank National Association [Member]",
        "terseLabel": "JPMorgan Chase Bank, National Association"
       }
      }
     },
     "localname": "JpmorganChaseBankNationalAssociationMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_LeverageRatioRequired": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Leverage ratio requirement as defined in the regulations.",
        "label": "Leverage Ratio, Required",
        "terseLabel": "Leverage ratio - Required"
       }
      }
     },
     "localname": "LeverageRatioRequired",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_LimitonDividendPaymentRatioofMarketValueofCapitaltoParValueofCapital": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Ratio of estimated market value of total capital to par value of capital stock, with limitation on the payment of dividends as per the Bank's risk management policy.",
        "label": "Limit on Dividend Payment, Ratio of Market Value of Capital to Par Value of Capital",
        "terseLabel": "Limit on Dividend Payment, Ratio of Market Value of Capital to Par Value of Capital"
       }
      }
     },
     "localname": "LimitonDividendPaymentRatioofMarketValueofCapitaltoParValueofCapital",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_LoansAndLeasesReceivableSeriousDelinquenciesRatio": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Loans that are 90 days or more past due or in the process of foreclosure (including past due or current loans in the process of foreclosure) as a percentage of total mortgage loans outstanding.",
        "label": "Loans and Leases Receivable, Serious Delinquencies Ratio",
        "terseLabel": "Serious delinquencies as a percentage of total mortgage loans outstanding"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableSeriousDelinquenciesRatio",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_LoansAndLeasesReceivableUnamortizedDiscounts": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_LoansAndLeasesReceivableGrossCarryingAmount",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Reflects the cumulative amount of discounts from the face amount of loans that are being amortized into income as an adjustment of yield.",
        "label": "Loans and Leases Receivable, Unamortized Discounts",
        "negatedTerseLabel": "Unamortized discounts"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableUnamortizedDiscounts",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_LoansAndLeasesReceivableUnamortizedPremiums": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LoansAndLeasesReceivableGrossCarryingAmount",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Reflects the cumulative amount of premiums over the face amount of loans that are being amortized into income as an adjustment of yield.",
        "label": "Loans and Leases Receivable, Unamortized Premiums",
        "terseLabel": "Unamortized premiums"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableUnamortizedPremiums",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_LoansReceivableWithFixedRatesOfInterestLongTermMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A mortgage loan issued by a bank with a fixed rate of interest and a repayment period of more than 15 years.",
        "label": "Loans Receivable With Fixed Rates Of Interest Long Term [Member]",
        "terseLabel": "Fixed Rate Long Term mortgage loans"
       }
      }
     },
     "localname": "LoansReceivableWithFixedRatesOfInterestLongTermMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_LoansReceivableWithFixedRatesOfInterestMediumTermMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A mortgage loan issued by a bank with a fixed rate of interest and a repayment period of 15 years or less.",
        "label": "Loans Receivable With Fixed Rates Of Interest Medium Term [Member]",
        "verboseLabel": "Fixed rate medium-term mortgage loans"
       }
      }
     },
     "localname": "LoansReceivableWithFixedRatesOfInterestMediumTermMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_MPFServiceFeeExpensetoFHLBChicago": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Expenses recognized resulting from transactions (excluding transactions that are eliminated in consolidated or combined financial statements) with related party.",
        "label": "MPF Service Fee Expense to FHLB Chicago",
        "terseLabel": "MPF Service Fee Expense to FHLB Chicago"
       }
      }
     },
     "localname": "MPFServiceFeeExpensetoFHLBChicago",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_MUFGUnionBankNAMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "MUFG Union Bank, NA [Member]",
        "label": "MUFG Union Bank, NA [Member]",
        "terseLabel": "MUFG Union Bank, NA [Member]"
       }
      }
     },
     "localname": "MUFGUnionBankNAMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_MandatorilyRedeemableCapitalStockRedemptionPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Redemption period for mandatorily redeemable capital stock.",
        "label": "Mandatorily Redeemable Capital Stock, Redemption Period",
        "terseLabel": "Mandatorily Redeemable Capital Stock, Redemption Period"
       }
      }
     },
     "localname": "MandatorilyRedeemableCapitalStockRedemptionPeriod",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "fhlbsf_MandatorilyRedeemableCapitalStockRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Mandatorily Redeemable Capital Stock [Roll Forward]",
        "terseLabel": "Mandatorily Redeemable Capital Stock [Roll Forward]"
       }
      }
     },
     "localname": "MandatorilyRedeemableCapitalStockRollForward",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_MortgageLoansHeldForPortfolioTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of mortgage loans held for portfolio (can include unpaid principal balance, premiums, discounts, deferred loan costs and hedging adjustments).",
        "label": "Mortgage Loans Held for Portfolio [Table Text Block]",
        "terseLabel": "Schedule of Participating Mortgage Loans"
       }
      }
     },
     "localname": "MortgageLoansHeldForPortfolioTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_MortgageLoansOnRealEstateOriginalContractualTerms": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the original contractual terms of Medium and Long-Term loans receivable.",
        "label": "Mortgage Loans on Real Estate, Original Contractual Terms",
        "terseLabel": "Medium-term Loan Original Contractual Terms"
       }
      }
     },
     "localname": "MortgageLoansOnRealEstateOriginalContractualTerms",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "fhlbsf_MortgageRelatedBusinessMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The operating segment which consists of mortgage-backed securities \n investments, mortgage loans acquired through the Mortgage Partnership Finance\u00ae (MPF\u00ae) Program, and the related financing and hedging instruments.",
        "label": "Mortgage-Related Business [Member]",
        "terseLabel": "Mortgage- Related Business"
       }
      }
     },
     "localname": "MortgageRelatedBusinessMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_MultiplierForDeterminingPermanentCapitalInLeverageCapitalCalculation": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The weighting factor used for permanent capital when calculating total leverage capital.",
        "label": "Multiplier for Determining Permanent Capital in Leverage Capital Calculation",
        "terseLabel": "Multiplier for Determining Permanent Capital in Leverage Capital Calculation"
       }
      }
     },
     "localname": "MultiplierForDeterminingPermanentCapitalInLeverageCapitalCalculation",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "decimalItemType"
    },
    "fhlbsf_NetNoncreditPortionOfOtherThanTemporaryImpairmentLossesOnAvailableForSaleSecuritiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Other Than Temporary Impairment Losses Investments Portion In Other Comprehensive Income Loss Before Tax Portion Attributable To Noncontrolling Interest Available for Sale Securities [Abstract]",
        "label": "Net Noncredit Portion Of Other than temporary Impairment Losses On Available for sale Securities [Abstract]",
        "terseLabel": "Net non-credit-related OTTI gain/(loss) on AFS securities"
       }
      }
     },
     "localname": "NetNoncreditPortionOfOtherThanTemporaryImpairmentLossesOnAvailableForSaleSecuritiesAbstract",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_NetNoncreditPortionOfOtherThanTemporaryImpairmentLossesonHTMSecuritiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Net Noncredit Portion Of Other Than Temporary Impairment Losses on HTM Securities [Abstract]",
        "label": "Net Noncredit Portion Of Other Than Temporary Impairment Losses on HTM Securities [Abstract]",
        "terseLabel": "Net Noncredit Portion Of Other Than Temporary Impairment Losses on HTM Securities [Abstract]"
       }
      }
     },
     "localname": "NetNoncreditPortionOfOtherThanTemporaryImpairmentLossesonHTMSecuritiesAbstract",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_NetSettlementsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Net settlements of Economic Hedges",
        "label": "Net Settlements [Member]",
        "terseLabel": "Net Settlements [Member]"
       }
      }
     },
     "localname": "NetSettlementsMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_NonCallableMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A debt obligation not collateralized by pledge, mortgage or other lien in the entity's assets and is neither callable or putable.",
        "label": "Non Callable [Member]",
        "terseLabel": "Non-callable"
       }
      }
     },
     "localname": "NonCallableMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_OffBalanceSheetCommitmentsTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of short-term or long-term contractual arrangements and obligations that, in accordance with GAAP, are not recognized on the balance sheet or may be recorded on the balance sheet in amounts that are different from the full contract or notional amount of the transactions.",
        "label": "Off-Balance Sheet Commitments [Table Text Block]",
        "terseLabel": "Off-Balance Sheet Commitments"
       }
      }
     },
     "localname": "OffBalanceSheetCommitmentsTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_OtherBorrowersMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Other Borrowers [Member]",
        "label": "Other Borrowers [Member]",
        "terseLabel": "Other Borrowers"
       }
      }
     },
     "localname": "OtherBorrowersMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_OtherComprehensiveIncomeLossOtherThanTemporaryImpairmentLossesAvailableForSaleSecuritiesAdjustment": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome": {
       "order": 3.0,
       "parentTag": "us-gaap_OtherComprehensiveIncomeLossBeforeTaxPortionAttributableToParent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of total net non-credit portion of other than temporary impairment (OTTI) related losses on debt securities categorized as Available-for-sale.",
        "label": "Other Comprehensive Income (Loss), Other Than Temporary Impairment Losses Available-for-sale Securities Adjustment",
        "terseLabel": "Total net non-credit-related OTTI gain/(loss) on AFS securities"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossOtherThanTemporaryImpairmentLossesAvailableForSaleSecuritiesAdjustment",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_OtherComprehensiveIncomeNetChangeInFairValueOfOtherThanTemporaryImpairmentSecurities": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Subsequent increases or decreases in fair value on OTTI Securities classified as AFS to the extent it does not exceed previously recorded non-credit OTTI.",
        "label": "Other Comprehensive Income Net Change in Fair Value Of Other Than Temporary Impairment Securities",
        "verboseLabel": "Net change in fair value"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeNetChangeInFairValueOfOtherThanTemporaryImpairmentSecurities",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_OtherThanMortgageBackedSecuritiesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the total of non-mortgage backed securities, which may be issued by federal, state or local government and/or by other non-mortgage related entities.",
        "label": "Other Than Mortgage Backed Securities [Member]",
        "verboseLabel": "Non Mortgage Backed Securities"
       }
      }
     },
     "localname": "OtherThanMortgageBackedSecuritiesMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeldAssumptionForMeasurementLossSeverityWeightedAverage": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The estimated weighted average loss severity expected to be incurred on Other Than Temporary Impairment credit losses recognized in earnings.",
        "label": "Other Than Temporary Impairment Credit Losses Recognized In Earnings Credit Losses On Debt Securities Held Assumption For Measurement Loss Severity Weighted Average",
        "terseLabel": "Loss Severity Weighted Average"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeldAssumptionForMeasurementLossSeverityWeightedAverage",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeldAssumptionForMeasurementPrepaymentSpeedWeightedAverage": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Estimated weighted average rate of speed of prepayments of principal on financial assets. This is used as a key input and assumption in measuring the fair value of assets or liabilities as of the date of the latest statement of financial position presented.",
        "label": "Other Than Temporary Impairment, Credit Losses Recognized In Earnings, Credit Losses On Debt Securities Held, Assumption For Measurement, Prepayment Speed Weighted Average",
        "terseLabel": "Prepayment Weighted Average"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeldAssumptionForMeasurementPrepaymentSpeedWeightedAverage",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_OtherThanTemporaryImpairmentLossesInvestmentsPortionRecognizedInEarningsNetQualitativeDisclosuresDefaultRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The weighted average default rate of the underlying assets in the security that was considered as one of the potential factors in reaching a conclusion that the investments are other than temporarily impaired and the amount of such impairment determined to be related to credit loss recognized in earnings.",
        "label": "Other than Temporary Impairment Losses, Investments, Portion Recognized in Earnings, Net, Qualitative Disclosures, Default Rate",
        "terseLabel": "Default Rate Weighted Average"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentLossesInvestmentsPortionRecognizedInEarningsNetQualitativeDisclosuresDefaultRate",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_OtherthanTemporaryImpairmentCreditLossesRecognizedinEarningsTotalaccretionoramortization": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents the total accretion or amortization associated with other than temporary impairment (OTTI) of a debt security held or impaired PLRMBS, that was recognized in interest income.",
        "label": "Other than Temporary Impairment, Credit Losses Recognized in Earnings, Total accretion or amortization",
        "verboseLabel": "OTTI PLRMBS, Total accretion or amortization recognized in interest income"
       }
      }
     },
     "localname": "OtherthanTemporaryImpairmentCreditLossesRecognizedinEarningsTotalaccretionoramortization",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_ProceedsFromSaleofFederalHomeLoanBankAdvancesAbstractAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "-- None. No documentation exists for this element. --",
        "label": "Proceeds From Sale of Federal Home Loan Bank Advances Abstract [Abstract]",
        "terseLabel": "Advances:"
       }
      }
     },
     "localname": "ProceedsFromSaleofFederalHomeLoanBankAdvancesAbstractAbstract",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_RangeInterestRateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial instruments with interest rates based on the number of days a specified index is within/outside of a specified range.",
        "label": "Range Interest Rate [Member]",
        "terseLabel": "Range Interest Rate [Member]"
       }
      }
     },
     "localname": "RangeInterestRateMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_RatioofMarketValueofCapitaltoParValueofCapitalStock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The ratio of the Bank's estimated Market Value of Total Capital to Par Value of Capital Stock",
        "label": "Ratio of Market Value of Capital to Par Value of Capital Stock",
        "terseLabel": "Ratio of Market Value of Capital to Par Value of Capital Stock"
       }
      }
     },
     "localname": "RatioofMarketValueofCapitaltoParValueofCapitalStock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_RegulatoryCapitalRatioRequired": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Regulatory capital ratio requirement as defined in the regulations.",
        "label": "Regulatory Capital Ratio, Required",
        "terseLabel": "Regulatory Capital Ratio, Required"
       }
      }
     },
     "localname": "RegulatoryCapitalRatioRequired",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_RegulatoryRestrictionsOnPaymentOfCapitalStockDividendsExcessStockToAssetsPercent": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Regulatory restrictions on payment of Capital Stock Dividends, percentage of excess stock to assets.",
        "label": "Regulatory Restrictions on Payment of Capital Stock Dividends, Excess Stock to Assets, Percent",
        "terseLabel": "Regulatory Restrictions on Payment of Capital Stock Dividends, Excess Stock to Assets, Percent"
       }
      }
     },
     "localname": "RegulatoryRestrictionsOnPaymentOfCapitalStockDividendsExcessStockToAssetsPercent",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_RestrictedRetainedEarningsActivityRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Activity of the restricted retained earnings during the period",
        "label": "Restricted Retained Earnings Activity [Roll Forward]",
        "terseLabel": "Retained Earnings Activity [Roll Forward]"
       }
      }
     },
     "localname": "RestrictedRetainedEarningsActivityRollForward",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_RestrictiononDividendPaymentRatioofMarketValueofCapitaltoParValueofCapitalLessthan70": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Ratio of Market Value of Capital to Par Value of Capital if less than 70%, payment of dividend is restricted as per the Bank's risk management policy.",
        "label": "Restriction on Dividend Payment, Ratio of Market Value of Capital to Par Value of Capital Less than 70%",
        "terseLabel": "Restriction on Dividend Payment, Ratio of Market Value of Capital to Par Value of Capital Less than 70%"
       }
      }
     },
     "localname": "RestrictiononDividendPaymentRatioofMarketValueofCapitaltoParValueofCapitalLessthan70",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "fhlbsf_RetainedEarningsSetbytheBoardincJCEA": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Retained Earnings, Set by the Board including JCEA",
        "label": "Retained Earnings, Set by the Board inc JCEA",
        "terseLabel": "Retained Earnings, Set by the Board inc JCEA"
       }
      }
     },
     "localname": "RetainedEarningsSetbytheBoardincJCEA",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_ScheduleOfConsolidatedObligationBondsByCallFeatureTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of consolidated obligations bonds outstanding by call feature.",
        "label": "Schedule of Consolidated Obligation Bonds by Call Feature [Table Text Block]",
        "terseLabel": "Schedule of Long-term Debt by Call Feature"
       }
      }
     },
     "localname": "ScheduleOfConsolidatedObligationBondsByCallFeatureTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_ScheduleOfInterestRatePaymentTermsOnDepositLiabilitiesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule of interest rate payment terms on deposit liabilities.",
        "label": "Schedule of Interest Rate Payment Terms On Deposit Liabilities [Table Text Block]",
        "terseLabel": "Schedule of Interest Rate Payment Terms On Deposit Liabilities"
       }
      }
     },
     "localname": "ScheduleOfInterestRatePaymentTermsOnDepositLiabilitiesTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_ScheduleOfMandatorilyRedeemableCapitalStockTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the changes in the balance of mandatorily redeemable capital stock.",
        "label": "Schedule of Mandatorily Redeemable Capital Stock [Table Text Block]",
        "terseLabel": "Schedule of Mandatorily Redeemable Capital Stock"
       }
      }
     },
     "localname": "ScheduleOfMandatorilyRedeemableCapitalStockTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_ScheduleOfMaturitiesOfConsolidatedObligationBondsByContractualOrNextCallDateTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of consolidated obligation bonds outstanding by year of contractual maturity or next call date.",
        "label": "Schedule of Maturities of Consolidated Obligation Bonds by Contractual or Next Call Date [Table Text Block]",
        "terseLabel": "Schedule of Maturities of Long-term Debt by Contractual or Next Call Date"
       }
      }
     },
     "localname": "ScheduleOfMaturitiesOfConsolidatedObligationBondsByContractualOrNextCallDateTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_ScheduleOfRestrictedRetainedEarningsTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the components of restricted retained earnings.",
        "label": "Schedule of Restricted Retained Earnings [Table Text Block]",
        "terseLabel": "Schedule of Restricted Retained Earnings"
       }
      }
     },
     "localname": "ScheduleOfRestrictedRetainedEarningsTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_ScheduleOfSignificantInputsInMeasuringOtherThanTemporaryImpairmentsRecognizedInEarningsTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Significant inputs used to measure the amount of the credit loss recognized in earnings for those securities for which an other-than-temporary impairment was determined to have occurred as well as the related current credit enhancement.",
        "label": "Schedule of Significant Inputs In Measuring Other Than Temporary Impairments Recognized In Earnings [Table Text Block]",
        "terseLabel": "Schedule of Significant Inputs In Measuring Other Than Temporary Impairments Recognized In Earnings"
       }
      }
     },
     "localname": "ScheduleOfSignificantInputsInMeasuringOtherThanTemporaryImpairmentsRecognizedInEarningsTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_ScheduleofConcentrationofCapitalTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of concentration in capital stock, including mandatorily redeemable capital stock, by institution.",
        "label": "Schedule of Concentration of Capital [Table Text Block]",
        "terseLabel": "Schedule of Concentration of Capital [Table Text Block]"
       }
      }
     },
     "localname": "ScheduleofConcentrationofCapitalTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_ScheduleofConsolidatedObligationBondsByInterestRatePaymentTermsTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of interest rate payment terms for debt.",
        "label": "Schedule of Consolidated Obligation Bonds By Interest Rate Payment Terms [Table Text Block]",
        "terseLabel": "Schedule of Interest Rate Payment Terms for Debt"
       }
      }
     },
     "localname": "ScheduleofConsolidatedObligationBondsByInterestRatePaymentTermsTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_SecuritiesBorrowedorPurchasedunderAgreementstoResellMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Funds loaned in the form of a security resale agreement between the entity and another party for the purchase and resale of identical or substantially the same securities at a date certain for a specified price.",
        "label": "Securities Borrowed or Purchased under Agreements to Resell [Member]",
        "terseLabel": "Securities Borrowed or Purchased under Agreements to Resell [Member]"
       }
      }
     },
     "localname": "SecuritiesBorrowedorPurchasedunderAgreementstoResellMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_SecuritiesPurchasedunderAgreementstoResellFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value as of the balance sheet date of funds outstanding loaned in the form of security resale agreements",
        "label": "Securities Purchased under Agreements to Resell, Fair Value Disclosure",
        "terseLabel": "Securities purchased under agreements to resell"
       }
      }
     },
     "localname": "SecuritiesPurchasedunderAgreementstoResellFairValueDisclosure",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_SignificantInputsonPLRMBSLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "[Line Items] for Significant Inputs on PLRMBS [Table]",
        "label": "Significant Inputs on PLRMBS [Line Items]",
        "terseLabel": "Significant Inputs on PLRMBS [Line Items]"
       }
      }
     },
     "localname": "SignificantInputsonPLRMBSLineItems",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_SignificantInputsonPLRMBSTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Significant Inputs on PLRMBS [Table]",
        "label": "Significant Inputs on PLRMBS [Table]",
        "terseLabel": "Significant Inputs on PLRMBS [Table]"
       }
      }
     },
     "localname": "SignificantInputsonPLRMBSTable",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "fhlbsf_SingleFamilyMortgagebackedSecuritiesOtherUSObligationsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debt securities collateralized by single family real estate mortgage loans (mortgages), issued by US government agencies, such as the Government National Mortgage Association (GNMA or Ginnie Mae). Excludes mortgage backed securities issued by Government-sponsored Enterprises (GSEs), which are not backed by the full faith and credit of the US Government.",
        "label": "Single Family, Mortgage-backed Securities, Other US Obligations [Member]",
        "terseLabel": "Ginnie Mae",
        "verboseLabel": "MBS \u2013 Other U.S. obligations \u2013 Ginnie Mae"
       }
      }
     },
     "localname": "SingleFamilyMortgagebackedSecuritiesOtherUSObligationsMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_StandbyLettersOfCreditFinalExpiration": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The final expiration year of the standby letters of credit.",
        "label": "Standby Letters Of Credit, Final Expiration",
        "terseLabel": "Standby Letters Of Credit, Final Expiration"
       }
      }
     },
     "localname": "StandbyLettersOfCreditFinalExpiration",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "gYearItemType"
    },
    "fhlbsf_StepdownInterestRateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial instruments with decreasing fixed rates for specified intervals over the life of the instruments.",
        "label": "Step-down Interest Rate [Member]",
        "terseLabel": "Step-down Interest Rate [Member]"
       }
      }
     },
     "localname": "StepdownInterestRateMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_StepupInterestRateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial instruments with increasing fixed rates for specified intervals over the life of the instruments.",
        "label": "Step-up Interest Rate [Member]",
        "terseLabel": "Step-up Interest Rate [Member]"
       }
      }
     },
     "localname": "StepupInterestRateMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_TopfiveborrowersMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Concentration in Advances top five borrowers and their affiliates [Member]",
        "label": "Top five borrowers [Member]",
        "terseLabel": "Top five borrowers"
       }
      }
     },
     "localname": "TopfiveborrowersMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_TransactionswithCertainMembersandNonmembersTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Transactions with members that have an officer or director serving on the Bank\u2019s Board of Directors, by balance sheet and income statement grouping.",
        "label": "Transactions with Certain Members and Nonmembers [Table Text Block]",
        "terseLabel": "Transactions with Certain Members and Nonmembers"
       }
      }
     },
     "localname": "TransactionswithCertainMembersandNonmembersTableTextBlock",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "fhlbsf_TransactionwithMemberOfficerorDirectorMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Transactions with members that have an officer or director serving on the Bank\u2019s Board of Directors. In instances where the member has an officer or director serving on the Bank\u2019s Board of Directors, all of the aforementioned transactions with the member are subject to the same eligibility and credit criteria, as well as the same conditions, as comparable transactions with all other members, in accordance with regulations governing the operations of the FHLBanks.",
        "label": "Transaction with Member Officer or Director [Member]",
        "terseLabel": "Transaction with Member Officer or Director"
       }
      }
     },
     "localname": "TransactionwithMemberOfficerorDirectorMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_USTreasurySecuritiesAndUSGovernmentAgenciesDebtSecuritiesMemberDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This category includes investments in debt securities issued by the United States Department of the Treasury and US Government Agencies. Such securities may include treasury bills (short-term maturities - one year or less), treasury notes (intermediate term maturities - two to ten years), and treasury bonds (long-term maturities - ten to thirty years), and debt securities issued by the Government National Mortgage Association (Ginnie Mae). Excludes US treasury securities and debt issued by government-sponsored Enterprises (GSEs), for example, but is not limited to, Federal Home Loan Mortgage Corporation (FHLMC or Freddie Mac), Federal National Mortgage Association (FNMA or Fannie Mae), and the Federal Home Loan Bank (FHLB).",
        "label": "USTreasurySecuritiesAndUSGovernmentAgenciesDebtSecuritiesMember [Domain]",
        "terseLabel": "US Obligations - Treasury"
       }
      }
     },
     "localname": "USTreasurySecuritiesAndUSGovernmentAgenciesDebtSecuritiesMemberDomain",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_VariableInterestRateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial instruments with variable rate of interest.",
        "label": "Variable Interest Rate [Member]",
        "verboseLabel": "Adjustable rate"
       }
      }
     },
     "localname": "VariableInterestRateMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_VoluntaryCharitableContribution": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 5.0,
       "parentTag": "us-gaap_NoninterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The voluntary charitable contribution was made by the Bank to the Quality Jobs Fund, a donor-advised fund established to support quality jobs growth and small business expansion.",
        "label": "Voluntary Charitable Contribution",
        "terseLabel": "Quality Jobs Fund expense"
       }
      }
     },
     "localname": "VoluntaryCharitableContribution",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "fhlbsf_WellsFargoBankNAMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Wells Fargo Bank NA [Member]",
        "label": "Wells Fargo Bank NA [Member]",
        "terseLabel": "Wells Fargo Bank NA [Member]"
       }
      }
     },
     "localname": "WellsFargoBankNAMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_WellsFargoFinancialNationalBankWestMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Wells Fargo Financial National Bank West",
        "label": "Wells Fargo Financial National Bank West [Member]",
        "terseLabel": "Wells Fargo Financial National Bank West [Member]"
       }
      }
     },
     "localname": "WellsFargoFinancialNationalBankWestMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "fhlbsf_WellsFargoandCompanyMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Wells Fargo and Company [Member]",
        "label": "Wells Fargo and Company [Member]",
        "terseLabel": "Wells Fargo and Company [Member]"
       }
      }
     },
     "localname": "WellsFargoandCompanyMember",
     "nsuri": "http://www.fhlbsf.com/20200331",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_CounterpartyNameAxis": {
     "auth_ref": [
      "r39",
      "r92"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Counterparty Name [Axis]",
        "terseLabel": "Counterparty Name"
       }
      }
     },
     "localname": "CounterpartyNameAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails",
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MajorCustomersAxis": {
     "auth_ref": [
      "r123",
      "r253",
      "r254",
      "r434"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Customer [Axis]",
        "terseLabel": "Customer [Axis]"
       }
      }
     },
     "localname": "MajorCustomersAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MaximumMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Maximum [Member]",
        "terseLabel": "Maximum"
       }
      }
     },
     "localname": "MaximumMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails",
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MinimumMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Minimum [Member]",
        "terseLabel": "Minimum"
       }
      }
     },
     "localname": "MinimumMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails",
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MortgageLoansOnRealEstateDescriptionTypeOfPropertyAxis": {
     "auth_ref": [
      "r446",
      "r450"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Real Estate, Type of Property [Axis]",
        "terseLabel": "Real Estate, Type of Property [Axis]"
       }
      }
     },
     "localname": "MortgageLoansOnRealEstateDescriptionTypeOfPropertyAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MortgageLoansOnRealEstateLoanTypeAxis": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "SEC Schedule, 12-29, Real Estate Companies, Investment in Mortgage Loans on Real Estate, Loan Type [Axis]",
        "terseLabel": "SEC Schedule, 12-29, Real Estate Companies, Investment in Mortgage Loans on Real Estate, Loan Type [Axis]"
       }
      }
     },
     "localname": "MortgageLoansOnRealEstateLoanTypeAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MortgageLoansOnRealEstateLoanTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "SEC Schedule, 12-29, Real Estate Companies, Investment in Mortgage Loans on Real Estate, Loan Type [Domain]",
        "terseLabel": "SEC Schedule, 12-29, Real Estate Companies, Investment in Mortgage Loans on Real Estate, Loan Type [Domain]"
       }
      }
     },
     "localname": "MortgageLoansOnRealEstateLoanTypeDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MortgageLoansOnRealEstateNamePropertyTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Real Estate [Domain]",
        "terseLabel": "Real Estate [Domain]"
       }
      }
     },
     "localname": "MortgageLoansOnRealEstateNamePropertyTypeDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MortgageLoansOnRealEstateScheduleTable": {
     "auth_ref": [
      "r447"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "SEC Schedule, 12-29, Real Estate Companies, Investment in Mortgage Loans on Real Estate Schedule [Table]",
        "terseLabel": "Loans and Leases Receivable Disclosure"
       }
      }
     },
     "localname": "MortgageLoansOnRealEstateScheduleTable",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MultifamilyMember": {
     "auth_ref": [
      "r446",
      "r450"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Multifamily [Member]",
        "terseLabel": "MBS \u2013 GSEs \u2013 multifamily:"
       }
      }
     },
     "localname": "MultifamilyMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_NameOfMajorCustomerDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Customer [Domain]",
        "terseLabel": "Customer [Domain]"
       }
      }
     },
     "localname": "NameOfMajorCustomerDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RangeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Statistical Measurement [Axis]",
        "terseLabel": "Statistical Measurement [Axis]"
       }
      }
     },
     "localname": "RangeAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails",
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RangeMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Statistical Measurement [Domain]",
        "terseLabel": "Statistical Measurement [Domain]"
       }
      }
     },
     "localname": "RangeMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails",
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RepurchaseAgreementCounterpartyNameDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Counterparty Name [Domain]",
        "terseLabel": "Counterparty Name [Domain]"
       }
      }
     },
     "localname": "RepurchaseAgreementCounterpartyNameDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails",
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_SingleFamilyMember": {
     "auth_ref": [
      "r446",
      "r450"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Single Family [Member]",
        "terseLabel": "MBS \u2013 GSEs \u2013 single-family:"
       }
      }
     },
     "localname": "SingleFamilyMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccountingPoliciesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Accounting Policies [Abstract]"
       }
      }
     },
     "localname": "AccountingPoliciesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountingStandardsUpdate201613Member": {
     "auth_ref": [
      "r179"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accounting Standards Update 2016-13 Financial Instruments-Credit Losses (Topic 326): Measurement of Credit Losses on Financial Instruments.",
        "label": "Accounting Standards Update 2016-13 [Member]",
        "terseLabel": "Accounting Standards Update 2016-13 [Member]"
       }
      }
     },
     "localname": "AccountingStandardsUpdate201613Member",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember": {
     "auth_ref": [
      "r47",
      "r50",
      "r54",
      "r257",
      "r264"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accumulated other comprehensive (income) loss related to defined benefit plans attributable to the parent.",
        "label": "Accumulated Defined Benefit Plans Adjustment Attributable to Parent [Member]",
        "terseLabel": "Accumulated Defined Benefit Plans Adjustment"
       }
      }
     },
     "localname": "AccumulatedDefinedBenefitPlansAdjustmentMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember": {
     "auth_ref": [
      "r43",
      "r44",
      "r46",
      "r50",
      "r54"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "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), attributable to parent.",
        "label": "AOCI, Accumulated Gain (Loss), Debt Securities, Available-for-sale, Parent [Member]",
        "terseLabel": "AOCI, Accumulated Gain (Loss), Debt Securities, Available-for-sale, Parent [Member]"
       }
      }
     },
     "localname": "AccumulatedNetUnrealizedInvestmentGainLossMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossBeforeFederalHomeLoanBankAssessments": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 3.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated increase (decrease) in equity from transactions and other events and circumstances from non-owner sources, before Federal Home Loan Bank (FHLBank) assessments. Excludes net income (loss), and accumulated changes in equity from transactions resulting from investments by owners (distributions to owners). Includes, but is not limited to, foreign currency translation, certain pension adjustments, unrealized gain (loss) on certain investments in debt and equity securities, other than temporary impairment (OTTI) loss related to factors other than credit loss on available-for-sale and held-to-maturity debt securities, and increase (decrease) in the fair value of derivatives related to the effective portion of a designated cash flow hedge.",
        "label": "Accumulated Other Comprehensive Income (Loss), before Federal Home Loan Bank Assessments",
        "terseLabel": "Accumulated other comprehensive income/(loss) (AOCI)"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossBeforeFederalHomeLoanBankAssessments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems": {
     "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": "Accumulated Other Comprehensive Income (Loss) [Line Items]",
        "terseLabel": "Accumulated Other Comprehensive Income (Loss) [Line Items]"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "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/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossOtherThanTemporaryImpairmentNotCreditLossNetOfTaxAvailableforsaleDebtSecurities": {
     "auth_ref": [
      "r50",
      "r150",
      "r154"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accumulated other comprehensive loss related to portion of other than temporary impairment (OTTI) due to factors other than credit losses on debt securities categorized as available-for-sale that an entity does not intend to sell and which it is not more likely than not that the entity will be required to sell before recovery of the amortized cost basis of the debt security. The amount represented by this item is net of tax, as applicable.",
        "label": "Accumulated Other Comprehensive Income (Loss), Other than Temporary Impairment, Not Credit Loss, Net of Tax, Available-for-sale, Debt Securities",
        "negatedTerseLabel": "OTTI Recognized in AOCI"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossOtherThanTemporaryImpairmentNotCreditLossNetOfTaxAvailableforsaleDebtSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossOtherThanTemporaryImpairmentNotCreditLossNetOfTaxHeldtomaturityDebtSecurities": {
     "auth_ref": [
      "r50",
      "r150",
      "r165"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accumulated other comprehensive loss related to portion of other than temporary impairment (OTTI) due to factors other than credit losses on debt securities categorized as held-to-maturity that an entity does not intend to sell and which it is not more likely than not that the entity will be required to sell before recovery of the amortized cost basis of the debt security. The amount represented by this item is net of tax, as applicable.",
        "label": "Accumulated Other Comprehensive Income (Loss), Other than Temporary Impairment, Not Credit Loss, Net of Tax, Held-to-maturity, Debt Securities",
        "negatedTerseLabel": "OTTI Recognized in AOCI"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossOtherThanTemporaryImpairmentNotCreditLossNetOfTaxHeldtomaturityDebtSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeLossTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about components of accumulated other comprehensive income (loss).",
        "label": "Accumulated Other Comprehensive Income (Loss) [Table]",
        "terseLabel": "Accumulated Other Comprehensive Income (Loss) [Table]"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeLossTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeMember": {
     "auth_ref": [
      "r48",
      "r50",
      "r54",
      "r264"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccumulatedOtherThanTemporaryImpairmentMember": {
     "auth_ref": [
      "r45",
      "r50",
      "r54",
      "r150",
      "r264"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accumulated other comprehensive loss resulting from other-than-temporary impairments (OTTI) of debt securities if a portion of an other-than-temporary impairment has not been recognized in earnings, attributable to the parent.",
        "label": "Accumulated Other-than-Temporary Impairment Attributable to Parent [Member]",
        "terseLabel": "Accumulated Other-than-Temporary Impairment"
       }
      }
     },
     "localname": "AccumulatedOtherThanTemporaryImpairmentMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdditionalFairValueElementsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Additional Fair Value Elements [Abstract]",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "AdditionalFairValueElementsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AdjustmentsForChangeInAccountingPrincipleAxis": {
     "auth_ref": [
      "r102"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of change in accounting principle. Does not include error corrections.",
        "label": "Adjustments for Change in Accounting Principle [Axis]",
        "terseLabel": "Adjustments for Change in Accounting Principle [Axis]"
       }
      }
     },
     "localname": "AdjustmentsForChangeInAccountingPrincipleAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities": {
     "auth_ref": [
      "r82"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The sum of adjustments which are added to or deducted from net income or loss, including the portion attributable to noncontrolling interest, to reflect cash provided by or used in operating activities, in accordance with the indirect cash flow method.",
        "label": "Adjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities",
        "totalLabel": "Total adjustments"
       }
      }
     },
     "localname": "AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "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 income/(loss) to net cash provided by/(used in) operating activities:"
       }
      }
     },
     "localname": "AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AdvancesFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of Federal Home Loan Bank (FHLBank) advances carried under the fair value option.",
        "label": "Advances, Fair Value Disclosure",
        "periodEndLabel": "Balance, end of the period",
        "periodStartLabel": "Balance, beginning of the period",
        "terseLabel": "Advances",
        "verboseLabel": "Fair Value of Advances Under the Fair Value Option"
       }
      }
     },
     "localname": "AdvancesFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AffordableHousingProgramAssessments": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_NetIncomeLossAttributableToParentNetOfFederalHomeLoanBankAssessments",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expense for Affordable Housing Program (AHP) assessments required by the Federal Home Loan Bank Act of 1932.",
        "label": "Affordable Housing Program Assessments",
        "verboseLabel": "AHP Assessment"
       }
      }
     },
     "localname": "AffordableHousingProgramAssessments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AffordableHousingProgramObligation": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 5.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of obligation related to Affordable Housing Program (AHP) assessments required by the Federal Home Loan Bank Act of 1932.",
        "label": "Affordable Housing Program Obligation",
        "terseLabel": "Affordable Housing Program (AHP) payable"
       }
      }
     },
     "localname": "AffordableHousingProgramObligation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AllowanceForLoanAndLeaseLossesWriteoffsNet": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after recoveries, of loans and leases that have been written-off.",
        "label": "Allowance for Loan and Lease Losses Write-offs, Net",
        "terseLabel": "Charge offs/recoveries"
       }
      }
     },
     "localname": "AllowanceForLoanAndLeaseLossesWriteoffsNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Assets": {
     "auth_ref": [
      "r117",
      "r376",
      "r425"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "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",
        "terseLabel": "Assets",
        "totalLabel": "Total Assets"
       }
      }
     },
     "localname": "Assets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Assets [Abstract]",
        "terseLabel": "Assets:"
       }
      }
     },
     "localname": "AssetsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AssetsFairValueDisclosure": {
     "auth_ref": [
      "r307"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets, Fair Value Disclosure",
        "terseLabel": "Total fair value measurements \u2013 Assets"
       }
      }
     },
     "localname": "AssetsFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsFairValueDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Assets, Fair Value Disclosure [Abstract]",
        "terseLabel": "Assets"
       }
      }
     },
     "localname": "AssetsFairValueDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax": {
     "auth_ref": [
      "r155"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax": {
     "auth_ref": [
      "r156"
     ],
     "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",
        "negatedTerseLabel": "Gross Unrealized Losses"
       }
      }
     },
     "localname": "AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis": {
     "auth_ref": [
      "r152",
      "r200"
     ],
     "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",
        "verboseLabel": "Amortized Cost of AFS"
       }
      }
     },
     "localname": "AvailableForSaleDebtSecuritiesAmortizedCostBasis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Debt Securities, Available-for-sale [Abstract]",
        "verboseLabel": "AFS securities:"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainLossBeforeTax": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before tax of unrealized gain (loss) in accumulated other comprehensive income (AOCI) on investments in debt and equity securities classified as available-for-sale.",
        "label": "Available-for-sale Securities, Accumulated Gross Unrealized Gain (Loss), before Tax",
        "terseLabel": "Subsequent Unrealized Gains in Fair Value of Previously OTTI Impaired AFS"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainLossBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated unrealized loss on investments in debt and equity securities classified as available-for-sale that have been in a continuous loss position for twelve months or longer.",
        "label": "Available-for-sale Securities, Continuous Unrealized Loss Position, 12 Months or Longer, Accumulated Loss",
        "terseLabel": "12 Months or More: Unrealized Losses"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss": {
     "auth_ref": [
      "r168"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated unrealized loss on investments in debt and equity securities classified as available-for-sale in a continuous loss position.",
        "label": "Available-for-sale Securities, Continuous Unrealized Loss Position, Accumulated Loss",
        "terseLabel": "Available-for-sale Securities, Continuous Unrealized Loss Position, Accumulated Loss"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents the aggregate fair value of investments in debt and equity securities in an unrealized loss position which are categorized neither as held-to-maturity nor trading securities.",
        "label": "Available-for-sale Securities, Continuous Unrealized Loss Position, Fair Value",
        "terseLabel": "Available-for-sale Securities, Continuous Unrealized Loss Position, Fair Value"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Debt Securities, Available-for-sale, Unrealized Loss Position [Line Items]",
        "terseLabel": "Debt Securities, Available-for-sale, Unrealized Loss Position [Line Items]"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated unrealized loss on investments in debt and equity securities classified as available-for-sale that have been in a continuous loss position for less than twelve months.",
        "label": "Available-for-sale Securities, Continuous Unrealized Loss Position, Less than 12 Months, Accumulated Loss",
        "terseLabel": "Less Than 12 Months: Unrealized Losses"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents the aggregate fair value of investments in debt and equity securities categorized neither as held-to-maturity nor trading securities that have been in a continuous unrealized loss position for less than twelve months.",
        "label": "Available-for-sale Securities, Continuous Unrealized Loss Position, Less than Twelve Months, Fair Value",
        "terseLabel": "Less Than 12 Months: Estimated Fair Value"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents the aggregate fair value of investments in debt and equity securities categorized neither as held-to-maturity nor trading securities that have been in a continuous unrealized loss position for twelve months or longer.",
        "label": "Available-for-sale Securities, Continuous Unrealized Loss Position, Twelve Months or Longer, Fair Value",
        "terseLabel": "12 Months or More: Estimated Fair Value"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost": {
     "auth_ref": [
      "r159"
     ],
     "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), with single maturity date and allocated without single maturity date, maturing in second through fifth fiscal year following latest fiscal year. Excludes interim and annual periods when interim period is reported on rolling approach, from latest statement of financial position date.",
        "label": "Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, after One Through Five Years, Amortized Cost",
        "terseLabel": "Due after 1 year through 5 years - Amortized cost"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue": {
     "auth_ref": [
      "r157",
      "r159",
      "r410"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale), with single maturity date and allocated without single maturity date, maturing in second through fifth fiscal year following latest fiscal year. Excludes interim and annual periods when interim period is reported on rolling approach, from latest statement of financial position date.",
        "label": "Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, after One Through Five Years, Fair Value",
        "terseLabel": "Due after 1 year through 5 years - Fair value"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis": {
     "auth_ref": [],
     "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), with single maturity date and allocated without single maturity date, maturing in next rolling fiscal year following latest fiscal year. For interim and annual periods when interim period is reported on rolling approach, from latest statement of financial position date.",
        "label": "Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling within One Year, Amortized Cost",
        "terseLabel": "Due in 1 year or less - Amortized cost"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsAmortizedCostBasis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale), with single maturity date and allocated without single maturity date, maturing in next rolling fiscal year following latest fiscal year. For interim and annual periods when interim period is reported on rolling approach, from latest statement of financial position date.",
        "label": "Debt Securities, Available-for-sale, Maturity, Allocated and Single Maturity Date, Rolling within One Year, Fair Value",
        "terseLabel": "Due in 1 year or less - Fair value"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtMaturitiesNextRollingTwelveMonthsFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtSecurities": {
     "auth_ref": [
      "r147",
      "r153",
      "r200"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 5.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).",
        "label": "Debt Securities, Available-for-sale",
        "terseLabel": "Available-for-sale (AFS) securities (amortized cost of $16,427 and $15,206, respectively)",
        "verboseLabel": "Available-for-sale (AFS) securities"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableforsaleSecuritiesMember": {
     "auth_ref": [
      "r174"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Available-for-sale Securities [Member]",
        "terseLabel": "Available-for-sale Securities",
        "verboseLabel": "Available-for-sale Securities"
       }
      }
     },
     "localname": "AvailableforsaleSecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details",
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "domainItemType"
    },
    "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 [Axis]"
       }
      }
     },
     "localname": "BalanceSheetLocationAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BalanceSheetLocationDomain": {
     "auth_ref": [
      "r275",
      "r279"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Location in the balance sheet (statement of financial position).",
        "label": "Balance Sheet Location [Domain]",
        "terseLabel": "Balance Sheet Location [Domain]"
       }
      }
     },
     "localname": "BalanceSheetLocationDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_BasisOfPresentationAndSignificantAccountingPoliciesTextBlock": {
     "auth_ref": [
      "r101"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for the basis of presentation and significant accounting policies concepts. Basis of presentation describes the underlying basis used to prepare the financial statements (for example, US Generally Accepted Accounting Principles, Other Comprehensive Basis of Accounting, IFRS).  Accounting policies describe all significant accounting policies of the reporting entity.",
        "label": "Basis of Presentation and Significant Accounting Policies [Text Block]",
        "terseLabel": "Basis of Presentation and Significant Accounting Policies"
       }
      }
     },
     "localname": "BasisOfPresentationAndSignificantAccountingPoliciesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CapitalAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Capital [Abstract]",
        "terseLabel": "Capital [Abstract]"
       }
      }
     },
     "localname": "CapitalAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CapitalUnits": {
     "auth_ref": [
      "r439"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Value of capital units or capital shares. This element is relevant to issuers of face-amount certificates and registered investment companies.",
        "label": "Capital Units, Value",
        "terseLabel": "Capital Stock Outstanding"
       }
      }
     },
     "localname": "CapitalUnits",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CarryingReportedAmountFairValueDisclosureMember": {
     "auth_ref": [
      "r327",
      "r328"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Measured as reported on the statement of financial position (balance sheet).",
        "label": "Reported Value Measurement [Member]",
        "terseLabel": "Net Carrying Value"
       }
      }
     },
     "localname": "CarryingReportedAmountFairValueDisclosureMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CashAndDueFromBanks": {
     "auth_ref": [
      "r374"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 1.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For banks and other depository institutions: Includes cash on hand (currency and coin), cash items in process of collection, noninterest bearing deposits due from other financial institutions (including corporate credit unions), and noninterest bearing balances with the Federal Reserve Banks, Federal Home Loan Banks and central banks.",
        "label": "Cash and Due from Banks",
        "terseLabel": "Cash and due from banks"
       }
      }
     },
     "localname": "CashAndDueFromBanks",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents": {
     "auth_ref": [
      "r76",
      "r83",
      "r88"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash and cash equivalents, and cash and cash equivalents restricted to withdrawal or usage. Excludes amount for 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",
        "periodEndLabel": "Cash and due from banks end of period",
        "periodStartLabel": "Cash and due from banks beginning of period"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect": {
     "auth_ref": [
      "r76",
      "r338"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in cash and cash equivalents, and cash and cash equivalents restricted to withdrawal or usage; excluding 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), Excluding Exchange Rate Effect",
        "totalLabel": "Net increase/(decrease) in cash and due from banks"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "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 Noncash Investing and Financing Activities:"
       }
      }
     },
     "localname": "CashFlowNoncashInvestingAndFinancingActivitiesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ChangeInAccountingPrincipleMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A change from one generally accepted accounting principle to another generally accepted accounting principle when there are two or more generally accepted accounting principles that apply or when the accounting principle formerly used is no longer generally accepted. A change in the method of applying an accounting principle that is not treated as a change in accounting estimate also is considered a change in accounting principle.",
        "label": "Adjustments for Change in Accounting Principle [Domain]",
        "terseLabel": "Adjustments for Change in Accounting Principle [Domain]"
       }
      }
     },
     "localname": "ChangeInAccountingPrincipleMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1": {
     "auth_ref": [
      "r304"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of gain (loss) from the increase (decrease) in fair value of derivative and nonderivative instruments designated as fair value hedging instruments recognized in the income statement.",
        "label": "Change in Unrealized Gain (Loss) on Fair Value Hedging Instruments",
        "verboseLabel": "Change in Unrealized Gain (Loss) on Fair Value Hedging Instruments"
       }
      }
     },
     "localname": "ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1": {
     "auth_ref": [
      "r304"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of the increase (decrease) in fair value of the hedged item in a fair value hedge recognized in the income statement.",
        "label": "Change in Unrealized Gain (Loss) on Hedged Item in Fair Value Hedge",
        "verboseLabel": "Change in Unrealized Gain (Loss) on Hedged Item in Fair Value Hedge"
       }
      }
     },
     "localname": "ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ClassOfStockDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share of stock differentiated by the voting rights the holder receives. Examples include, but are not limited to, common stock, redeemable preferred stock, nonredeemable preferred stock, and convertible stock.",
        "label": "Class of Stock [Domain]",
        "terseLabel": "Class of Stock [Domain]"
       }
      }
     },
     "localname": "ClassOfStockDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ClassOfStockLineItems": {
     "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": "Class of Stock [Line Items]",
        "terseLabel": "Capital [Line Items]"
       }
      }
     },
     "localname": "ClassOfStockLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CollateralAlreadyPostedAggregateFairValue": {
     "auth_ref": [
      "r295"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate fair value of assets that are already posted, at the end of the reporting period, as collateral for derivative instruments with credit-risk-related contingent features.",
        "label": "Collateral Already Posted, Aggregate Fair Value",
        "terseLabel": "Collateral Already Posted, Aggregate Fair Value"
       }
      }
     },
     "localname": "CollateralAlreadyPostedAggregateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CollateralAxis": {
     "auth_ref": [
      "r196"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by category of collateral or no collateral.",
        "label": "Collateral [Axis]",
        "terseLabel": "Collateral [Axis]"
       }
      }
     },
     "localname": "CollateralAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CollateralDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Pledge or no pledge of specific property to serve as protection against default.",
        "label": "Collateral [Domain]",
        "terseLabel": "Collateral [Domain]"
       }
      }
     },
     "localname": "CollateralDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommitmentsAndContingencies": {
     "auth_ref": [
      "r23",
      "r215",
      "r387",
      "r430"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the caption on the face of the balance sheet to indicate that the entity has entered into (1) purchase or supply arrangements that will require expending a portion of its resources to meet the terms thereof, and (2) is exposed to potential losses or, less frequently, gains, arising from (a) possible claims against a company's resources due to future performance under contract terms, and (b) possible losses or likely gains from uncertainties that will ultimately be resolved when one or more future events that are deemed likely to occur do occur or fail to occur.",
        "label": "Commitments and Contingencies",
        "terseLabel": "Commitments and Contingencies (Note 13)"
       }
      }
     },
     "localname": "CommitmentsAndContingencies",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Commitments and Contingencies Disclosure [Abstract]"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureTextBlock": {
     "auth_ref": [
      "r214",
      "r222"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for commitments and contingencies.",
        "label": "Commitments and Contingencies Disclosure [Text Block]",
        "terseLabel": "Commitments and Contingencies"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingencies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CommitmentsAndContingenciesPolicyTextBlock": {
     "auth_ref": [
      "r90",
      "r231",
      "r448",
      "r449"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for commitments and contingencies, which may include policies for recognizing and measuring loss and gain contingencies.",
        "label": "Commitments and Contingencies, Policy [Policy Text Block]",
        "terseLabel": "Commitments and Contingencies, Policy"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CommitmentsFairValueDisclosure": {
     "auth_ref": [
      "r7"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of arrangements with third parties, including, but not limited to, operating lease arrangement and arrangement in which the entity has agreed to expend funds to procure goods or services, or has agreed to commit resources to supply goods or services.",
        "label": "Commitments, Fair Value Disclosure",
        "terseLabel": "Other commitments"
       }
      }
     },
     "localname": "CommitmentsFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CommonClassBMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Classification of common stock that has different rights than Common Class A, representing ownership interest in a corporation.",
        "label": "Common Class B [Member]",
        "terseLabel": "Common Class B",
        "verboseLabel": "Common Class B - Putable"
       }
      }
     },
     "localname": "CommonClassBMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommonStockMember": {
     "auth_ref": [],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommonStockOtherValueOutstanding": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 1.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Value of shares of other common stock instruments held by shareholders, such as exchangeable shares. May be all or portion of the number of common shares authorized.",
        "label": "Common Stock, Other Value, Outstanding",
        "terseLabel": "Capital stock-Class B-Putable ($100 par value) issued and outstanding: 32 shares and 30 shares, respectively",
        "verboseLabel": "Capital Stock"
       }
      }
     },
     "localname": "CommonStockOtherValueOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CommonStockParOrStatedValuePerShare": {
     "auth_ref": [
      "r10"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Face amount or stated value per share of common stock.",
        "label": "Common Stock, Par or Stated Value Per Share",
        "terseLabel": "Common stock, par value"
       }
      }
     },
     "localname": "CommonStockParOrStatedValuePerShare",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_CommonStockSharesIssued": {
     "auth_ref": [
      "r10"
     ],
     "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"
       }
      }
     },
     "localname": "CommonStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesOutstanding": {
     "auth_ref": [
      "r10",
      "r244"
     ],
     "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",
        "terseLabel": "Common Stock, Shares, Outstanding"
       }
      }
     },
     "localname": "CommonStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsLineItems": {
     "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": "Compliance with Regulatory Capital Requirements under Banking Regulations [Line Items]",
        "terseLabel": "Compliance with Regulatory Capital Requirements under Banking Regulations [Line Items]"
       }
      }
     },
     "localname": "ComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ComprehensiveIncomeLossNetOfFederalHomeLoanBankAssessmentsAttributableToParent": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in equity after Federal Home Loan Bank (FHLBank) assessments from transactions and other events and circumstances from non-owner sources attributable to the reporting entity. Includes changes in equity except those resulting from investments by owners and distributions to owners. Excludes transactions directly or indirectly attributable to that ownership interest in subsidiary equity which is not attributable to the parent.",
        "label": "Comprehensive Income (Loss), Net of Federal Home Loan Bank Assessments, Attributable to Parent",
        "terseLabel": "Comprehensive Income (Loss)",
        "totalLabel": "Total Comprehensive Income/(Loss)"
       }
      }
     },
     "localname": "ComprehensiveIncomeLossNetOfFederalHomeLoanBankAssessmentsAttributableToParent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ComprehensiveIncomeNoteTextBlock": {
     "auth_ref": [
      "r61"
     ],
     "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 Income/(Loss)"
       }
      }
     },
     "localname": "ComprehensiveIncomeNoteTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLoss"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ConcentrationRiskBenchmarkDomain": {
     "auth_ref": [
      "r109",
      "r110",
      "r329",
      "r330"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The denominator in a calculation of a disclosed concentration risk percentage.",
        "label": "Concentration Risk Benchmark [Domain]",
        "terseLabel": "Concentration Risk Benchmark [Domain]"
       }
      }
     },
     "localname": "ConcentrationRiskBenchmarkDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ConcentrationRiskByBenchmarkAxis": {
     "auth_ref": [
      "r109",
      "r110",
      "r329",
      "r330",
      "r436"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by benchmark of concentration risk.",
        "label": "Concentration Risk Benchmark [Axis]",
        "terseLabel": "Concentration Risk Benchmark [Axis]"
       }
      }
     },
     "localname": "ConcentrationRiskByBenchmarkAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskByTypeAxis": {
     "auth_ref": [
      "r109",
      "r110",
      "r329",
      "r330",
      "r436"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of concentration risk, for example, but not limited to, asset, liability, net assets, geographic, customer, employees, supplier, lender.",
        "label": "Concentration Risk Type [Axis]",
        "terseLabel": "Concentration Risk Type [Axis]"
       }
      }
     },
     "localname": "ConcentrationRiskByTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskLineItems": {
     "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": "Concentration Risk [Line Items]",
        "terseLabel": "Concentration Risk [Line Items]"
       }
      }
     },
     "localname": "ConcentrationRiskLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskPercentage1": {
     "auth_ref": [
      "r109",
      "r110",
      "r329",
      "r330"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For an entity that discloses a concentration risk in relation to quantitative amount, which serves as the \"benchmark\" (or denominator) in the equation, this concept represents the concentration percentage derived from the division.",
        "label": "Concentration Risk, Percentage",
        "terseLabel": "Percentage of Total Capital Stock Outstanding",
        "verboseLabel": "Concentration Risk, Percentage"
       }
      }
     },
     "localname": "ConcentrationRiskPercentage1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ConcentrationRiskTable": {
     "auth_ref": [
      "r108",
      "r109",
      "r110",
      "r111",
      "r329",
      "r331"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Describes the nature of a concentration, a benchmark to which it is compared, and the percentage that the risk is to the benchmark.",
        "label": "Concentration Risk [Table]",
        "terseLabel": "Concentration Risk [Table]"
       }
      }
     },
     "localname": "ConcentrationRiskTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskTypeDomain": {
     "auth_ref": [
      "r109",
      "r110",
      "r329",
      "r330"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For an entity that discloses a concentration risk as a percentage of some financial balance or benchmark, identifies the type (for example, asset, liability, net assets, geographic, customer, employees, supplier, lender) of the concentration.",
        "label": "Concentration Risk Type [Domain]",
        "terseLabel": "Concentration Risk Type [Domain]"
       }
      }
     },
     "localname": "ConcentrationRiskTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ConventionalLoanMember": {
     "auth_ref": [
      "r445"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Mortgage loan issued by a bank, which is typically in an amount between 70 to 80 percent of the purchase price of the property securing the loan, has a repayment period of 15 to 30 years, and requires that certain credit criteria be met.",
        "label": "Conventional Mortgage Loan [Member]",
        "terseLabel": "Conventional Mortgage Loan"
       }
      }
     },
     "localname": "ConventionalLoanMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CreditLossFinancialInstrumentPolicyTextBlock": {
     "auth_ref": [
      "r181",
      "r183",
      "r188",
      "r189",
      "r203"
     ],
     "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 Loss, Financial Instrument [Policy Text Block]"
       }
      }
     },
     "localname": "CreditLossFinancialInstrumentPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after tax of increase (decrease) to equity or (increase) decrease to net assets, resulting from the cumulative effect adjustment of a new accounting principle applied in the period of adoption.",
        "label": "Cumulative Effect of New Accounting Principle in Period of Adoption",
        "terseLabel": "Adjustment for cumulative effect of accounting change"
       }
      }
     },
     "localname": "CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Debt Disclosure [Abstract]"
       }
      }
     },
     "localname": "DebtDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtDisclosureTextBlock": {
     "auth_ref": [
      "r236"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for information about short-term and long-term debt arrangements, which includes amounts of borrowings under each line of credit, note payable, commercial paper issue, bonds indenture, debenture issue, own-share lending arrangements and any other contractual agreement to repay funds, and about the underlying arrangements, rationale for a classification as long-term, including repayment terms, interest rates, collateral provided, restrictions on use of assets and activities, whether or not in compliance with debt covenants, and other matters important to users of the financial statements, such as the effects of refinancing and noncompliance with debt covenants.",
        "label": "Debt Disclosure [Text Block]",
        "terseLabel": "Consolidated Obligations"
       }
      }
     },
     "localname": "DebtDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligations"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DebtInstrumentCarryingAmount": {
     "auth_ref": [
      "r5",
      "r235",
      "r378",
      "r422"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, before unamortized (discount) premium and debt issuance costs, of long-term debt. Includes, but is not limited to, notes payable, bonds payable, commercial loans, mortgage loans, convertible debt, subordinated debt and other types of debt.",
        "label": "Long-term Debt, Gross",
        "terseLabel": "Bonds",
        "verboseLabel": "CO Bonds Par"
       }
      }
     },
     "localname": "DebtInstrumentCarryingAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtInstrumentFaceAmount": {
     "auth_ref": [
      "r341",
      "r343"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Face (par) amount of debt instrument at time of issuance.",
        "label": "Debt Instrument, Face Amount",
        "terseLabel": "Total consolidated obligations, par value"
       }
      }
     },
     "localname": "DebtInstrumentFaceAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtInstrumentFairValue": {
     "auth_ref": [
      "r326"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of debt instrument payable, including, but not limited to, notes payable and loans payable.",
        "label": "Debt Instrument, Fair Value Disclosure",
        "periodEndLabel": "Balance, end of the period",
        "periodStartLabel": "Balance, beginning of the period",
        "terseLabel": "Fair Value of Bonds Under the Fair Value Option",
        "verboseLabel": "Bonds"
       }
      }
     },
     "localname": "DebtInstrumentFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtInstrumentInterestRateEffectivePercentageAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Debt Instrument, Interest Rate, Effective Percentage [Abstract]",
        "terseLabel": "Weighted Average Interest Rate [Abstract]"
       }
      }
     },
     "localname": "DebtInstrumentInterestRateEffectivePercentageAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtInstrumentLineItems": {
     "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 Instrument [Line Items]",
        "terseLabel": "Debt Instrument [Line Items]"
       }
      }
     },
     "localname": "DebtInstrumentLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtInstrumentRedemptionPeriodAxis": {
     "auth_ref": [
      "r414"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information about timing of debt redemption features under terms of the debt agreement.",
        "label": "Debt Instrument, Redemption, Period [Axis]",
        "terseLabel": "Debt Instrument, Redemption, Period [Axis]"
       }
      }
     },
     "localname": "DebtInstrumentRedemptionPeriodAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtInstrumentRedemptionPeriodDomain": {
     "auth_ref": [
      "r414"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Period as defined under terms of the debt agreement for debt redemption features.",
        "label": "Debt Instrument, Redemption, Period [Domain]",
        "terseLabel": "Debt Instrument, Redemption, Period [Domain]"
       }
      }
     },
     "localname": "DebtInstrumentRedemptionPeriodDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DebtInstrumentTable": {
     "auth_ref": [
      "r22",
      "r95",
      "r245",
      "r248",
      "r249",
      "r250",
      "r340",
      "r341",
      "r343",
      "r415"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A table or schedule providing information pertaining to long-term debt instruments or arrangements, including identification, terms, features, collateral requirements and other information necessary to a fair presentation. These are debt arrangements that originally required repayment more than twelve months after issuance or greater than the normal operating cycle of the company, if longer.",
        "label": "Schedule of Long-term Debt Instruments [Table]",
        "terseLabel": "Schedule of Long-term Debt Instruments [Table]"
       }
      }
     },
     "localname": "DebtInstrumentTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtInstrumentUnamortizedDiscount": {
     "auth_ref": [
      "r340",
      "r343"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after accumulated amortization, of debt discount.",
        "label": "Debt Instrument, Unamortized Discount",
        "negatedTerseLabel": "Unamortized discounts"
       }
      }
     },
     "localname": "DebtInstrumentUnamortizedDiscount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtInstrumentUnamortizedPremium": {
     "auth_ref": [
      "r340",
      "r343"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after accumulated amortization, of debt premium.",
        "label": "Debt Instrument, Unamortized Premium",
        "verboseLabel": "Unamortized premiums"
       }
      }
     },
     "localname": "DebtInstrumentUnamortizedPremium",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtSecuritiesAvailableForSaleAllowanceForCreditLoss": {
     "auth_ref": [
      "r154",
      "r200",
      "r204",
      "r205"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of allowance for credit loss 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, Allowance for Credit Loss",
        "negatedTerseLabel": "Allowance for Credit Losses"
       }
      }
     },
     "localname": "DebtSecuritiesAvailableForSaleAllowanceForCreditLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtSecuritiesAvailableForSaleRestricted": {
     "auth_ref": [
      "r358"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of restricted 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, Restricted",
        "terseLabel": "Available-for-sale securities pledged as collateral that may be repledged"
       }
      }
     },
     "localname": "DebtSecuritiesAvailableForSaleRestricted",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtSecuritiesAvailableForSaleTable": {
     "auth_ref": [
      "r177"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionFairValueTable": {
     "auth_ref": [
      "r201",
      "r207"
     ],
     "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), in unrealized loss position, without allowance for credit loss. Includes beneficial interest in securitized financial asset.",
        "label": "Debt Securities, Available-for-sale, Unrealized Loss Position, Fair Value [Table]",
        "terseLabel": "Debt Securities, Available-for-sale, Unrealized Loss Position, Fair Value [Table]"
       }
      }
     },
     "localname": "DebtSecuritiesAvailableForSaleUnrealizedLossPositionFairValueTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtSecuritiesTradingRestricted": {
     "auth_ref": [
      "r358"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of restricted investment in debt security measured at fair value with change in fair value recognized in net income (trading).",
        "label": "Debt Securities, Trading, Restricted",
        "terseLabel": "Trading securities pledged as collateral that may be repledged"
       }
      }
     },
     "localname": "DebtSecuritiesTradingRestricted",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DepositLiabilitiesDisclosuresTextBlock": {
     "auth_ref": [
      "r383",
      "r413"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for deposit liabilities including data and tables. It may include a description of the entity's deposit liabilities, the aggregate amount of time deposits (including certificates of deposit) in denominations of $100,000 or more at the balance sheet date; the aggregate amount of any demand deposits that have been reclassified as loan balances, such as overdrafts, at the balance sheet date; deposits that are received on terms other than those in the normal course of business, the amount of accrued interest on deposit liabilities; securities, mortgage loans or other financial instruments that serve as collateral for deposits; for time deposits having a remaining term of more than one year, the aggregate amount of maturities for each of the five years following the balance sheet date; and the weighted average interest rate for all deposit liabilities held by the entity.",
        "label": "Deposit Liabilities Disclosures [Text Block]",
        "terseLabel": "Deposits"
       }
      }
     },
     "localname": "DepositLiabilitiesDisclosuresTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/Deposits"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DepositLiabilitiesTypeTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of type of deposit liability.",
        "label": "Deposit Liabilities, Type [Table Text Block]",
        "terseLabel": "Schedule of Deposit Liabilities by Component"
       }
      }
     },
     "localname": "DepositLiabilitiesTypeTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DepositsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Deposits [Abstract]"
       }
      }
     },
     "localname": "DepositsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_DepositsDomestic": {
     "auth_ref": [
      "r383"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DepositsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 1.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate of all domestic interest-bearing and noninterest-bearing deposit liabilities.",
        "label": "Deposits, Domestic",
        "terseLabel": "Deposits",
        "totalLabel": "Deposits"
       }
      }
     },
     "localname": "DepositsDomestic",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DepositsFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of deposit liabilities held by the entity, including, but not limited to, foreign and domestic, interest and noninterest bearing, demand deposits, saving deposits, negotiable orders of withdrawal (NOW) and time deposits.",
        "label": "Deposits, Fair Value Disclosure",
        "terseLabel": "Deposits"
       }
      }
     },
     "localname": "DepositsFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DepreciationAmortizationAndAccretionNet": {
     "auth_ref": [
      "r81"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate net amount of depreciation, amortization, and accretion recognized during an accounting period. As a noncash item, the net amount is added back to net income when calculating cash provided by or used in operations using the indirect method.",
        "label": "Depreciation, Amortization and Accretion, Net",
        "terseLabel": "Depreciation and amortization"
       }
      }
     },
     "localname": "DepreciationAmortizationAndAccretionNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset": {
     "auth_ref": [
      "r30",
      "r267"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of obligation to return cash collateral under master netting arrangements offset against derivative assets.",
        "label": "Derivative Asset, Collateral, Obligation to Return Cash, Offset",
        "terseLabel": "Cash collateral received and related accrued interest"
       }
      }
     },
     "localname": "DerivativeAssetCollateralObligationToReturnCashOffset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement": {
     "auth_ref": [
      "r29"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value, before effects of master netting arrangements, of a financial asset or other contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset. Includes assets not subject to a master netting arrangement and elected not to be offset.",
        "label": "Derivative Asset, Fair Value, Gross Asset Including Not Subject to Master Netting Arrangement",
        "terseLabel": "Derivative Assets"
       }
      }
     },
     "localname": "DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeAssetFairValueGrossLiabilityAndObligationToReturnCashOffset": {
     "auth_ref": [
      "r30",
      "r42",
      "r267"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of liability associated with financial asset or other contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, and obligation to return cash collateral under master netting arrangements.",
        "label": "Derivative Asset, Fair Value, Gross Liability and Obligation to Return Cash, Offset",
        "negatedLabel": "Derivative Asset, Netting adjustments",
        "terseLabel": "Netting adjustments and cash collateral"
       }
      }
     },
     "localname": "DerivativeAssetFairValueGrossLiabilityAndObligationToReturnCashOffset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeAssetNotSubjectToMasterNettingArrangement": {
     "auth_ref": [
      "r32",
      "r40"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_DerivativeAssets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of financial asset or other contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, not subject to a master netting arrangement.",
        "label": "Derivative Asset, Not Subject to Master Netting Arrangement",
        "terseLabel": "Derivative Asset, Not Subject to Master Netting Arrangement"
       }
      }
     },
     "localname": "DerivativeAssetNotSubjectToMasterNettingArrangement",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeAssets": {
     "auth_ref": [
      "r31",
      "r37",
      "r326"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 10.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value, after the effects of master netting arrangements, of a financial asset or other contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset. Includes assets not subject to a master netting arrangement and not elected to be offset.",
        "label": "Derivative Asset",
        "terseLabel": "Derivative assets, net",
        "totalLabel": "Total Derivative Assets and Derivative Liabilities",
        "verboseLabel": "Total Derivative Assets and Derivative Liabilities"
       }
      }
     },
     "localname": "DerivativeAssets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeCollateralRightToReclaimCash": {
     "auth_ref": [
      "r33",
      "r38",
      "r299"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of right to receive cash collateral under master netting arrangements that have not been offset against derivative liabilities.",
        "label": "Derivative, Collateral, Right to Reclaim Cash",
        "terseLabel": "Derivative, Collateral, Right to Reclaim Cash"
       }
      }
     },
     "localname": "DerivativeCollateralRightToReclaimCash",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeContractTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial instrument or contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset.",
        "label": "Derivative Contract [Domain]",
        "terseLabel": "Derivative Contract Type [Domain]",
        "verboseLabel": "Derivative Contract Type [Domain]"
       }
      }
     },
     "localname": "DerivativeContractTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DerivativeFairValueOfDerivativeAsset": {
     "auth_ref": [
      "r29",
      "r41",
      "r277",
      "r356"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DerivativeAssets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value, before effects of master netting arrangements, of a financial asset or other contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset. Includes assets elected not to be offset. Excludes assets not subject to a master netting arrangement.",
        "label": "Derivative Asset, Fair Value, Gross Asset",
        "terseLabel": "Derivative Asset, Fair Value, Gross Recognized Amount"
       }
      }
     },
     "localname": "DerivativeFairValueOfDerivativeAsset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral": {
     "auth_ref": [
      "r34",
      "r38",
      "r298"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value, after effects of master netting arrangements, of financial asset or other contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset offset against an obligation to return collateral. Includes assets not subject to a master netting arrangement and not elected to be offset.",
        "label": "Derivative Asset, Fair Value, Amount Offset Against Collateral",
        "terseLabel": "Derivative Asset, Fair Value, Amount Offset Against Collateral"
       }
      }
     },
     "localname": "DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeFairValueOfDerivativeLiability": {
     "auth_ref": [
      "r29",
      "r41",
      "r277",
      "r356"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_DerivativeLiabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value, before effects of master netting arrangements, of a financial liability or contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset. Includes liabilities elected not to be offset. Excludes liabilities not subject to a master netting arrangement.",
        "label": "Derivative Liability, Fair Value, Gross Liability",
        "terseLabel": "Derivative Liability, Fair Value, Gross Recognized Amount"
       }
      }
     },
     "localname": "DerivativeFairValueOfDerivativeLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral": {
     "auth_ref": [
      "r34",
      "r38",
      "r298"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value, after effects of master netting arrangements, of financial liability or contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset offset against the right to receive collateral. Includes liabilities not subject to a master netting arrangement and not elected to be offset.",
        "label": "Derivative Liability, Fair Value, Amount Offset Against Collateral",
        "terseLabel": "Derivative Liability, Fair Value, Amount Offset Against Collateral"
       }
      }
     },
     "localname": "DerivativeFairValueOfDerivativeLiabilityAmountOffsetAgainstCollateral",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeInstrumentRiskAxis": {
     "auth_ref": [
      "r276",
      "r278",
      "r283",
      "r288"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of derivative contract.",
        "label": "Derivative Instrument [Axis]",
        "terseLabel": "Derivative Instrument [Axis]",
        "verboseLabel": "Derivative Instrument Risk [Axis]"
       }
      }
     },
     "localname": "DerivativeInstrumentRiskAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Derivative Instruments and Hedging Activities Disclosure [Abstract]"
       }
      }
     },
     "localname": "DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock": {
     "auth_ref": [
      "r306"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for derivative instruments and hedging activities including, but not limited to, risk management strategies, non-hedging derivative instruments, assets, liabilities, revenue and expenses, and methodologies and assumptions used in determining the amounts.",
        "label": "Derivative Instruments and Hedging Activities Disclosure [Text Block]",
        "terseLabel": "Derivatives and Hedging Activities"
       }
      }
     },
     "localname": "DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivities"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosuresLineItems": {
     "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": "Derivative Instruments and Hedging Activities Disclosures [Line Items]",
        "terseLabel": "Derivative Instruments and Hedging Activities Disclosures [Line Items]"
       }
      }
     },
     "localname": "DerivativeInstrumentsAndHedgingActivitiesDisclosuresLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosuresTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about derivatives and hedging activities.",
        "label": "Derivative Instruments and Hedging Activities Disclosures [Table]",
        "terseLabel": "Cumulative adjustments table"
       }
      }
     },
     "localname": "DerivativeInstrumentsAndHedgingActivitiesDisclosuresTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis": {
     "auth_ref": [
      "r273",
      "r276",
      "r283"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of hedging relationship.",
        "label": "Hedging Relationship [Axis]",
        "terseLabel": "Hedging Relationship [Axis]"
       }
      }
     },
     "localname": "DerivativeInstrumentsGainLossByHedgingRelationshipAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable": {
     "auth_ref": [
      "r273",
      "r276",
      "r283",
      "r288",
      "r289",
      "r301",
      "r305"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about the location and amount of derivative instruments and nonderivative instruments designated as hedging instruments reported before netting adjustments, and the amount of gain (loss) on derivative instruments and nonderivative instruments designated and qualified as hedging instruments.",
        "label": "Derivative Instruments, Gain (Loss) [Table]",
        "terseLabel": "Derivative Instruments, Gain (Loss) by Hedging Relationship, by Income Statement Location, by Derivative Instrument Risk [Table]"
       }
      }
     },
     "localname": "DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativeInstrumentsGainLossLineItems": {
     "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": "Derivative Instruments, Gain (Loss) [Line Items]",
        "terseLabel": "Derivative Instruments, Gain (Loss) [Line Items]"
       }
      }
     },
     "localname": "DerivativeInstrumentsGainLossLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet": {
     "auth_ref": [
      "r282",
      "r284"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 4.0,
       "parentTag": "us-gaap_NoninterestIncome",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of realized and unrealized gain (loss) of derivative instruments not designated or qualifying as hedging instruments.",
        "label": "Derivative Instruments Not Designated as Hedging Instruments, Gain (Loss), Net",
        "terseLabel": "Derivative Instruments Not Designated as Hedging Instruments, Gain (Loss), Net",
        "verboseLabel": "Derivative Instruments Not Designated as Hedging Instruments, Gain (Loss), Net"
       }
      }
     },
     "localname": "DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeLiabilities": {
     "auth_ref": [
      "r31",
      "r37",
      "r326"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 6.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value, after the effects of master netting arrangements, of a financial liability or contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset. Includes liabilities not subject to a master netting arrangement and not elected to be offset.",
        "label": "Derivative Liability",
        "terseLabel": "Derivative liabilities, net",
        "totalLabel": "Derivative Assets and Derivative Liabilities"
       }
      }
     },
     "localname": "DerivativeLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeLiabilityCollateralRightToReclaimCashOffset": {
     "auth_ref": [
      "r30",
      "r267"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of right to receive cash collateral under master netting arrangements offset against derivative liabilities.",
        "label": "Derivative Liability, Collateral, Right to Reclaim Cash, Offset",
        "terseLabel": "Cash collateral posted and related accrued interest"
       }
      }
     },
     "localname": "DerivativeLiabilityCollateralRightToReclaimCashOffset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeLiabilityFairValueGrossAssetAndRightToReclaimCashOffset": {
     "auth_ref": [
      "r30",
      "r42",
      "r267"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_DerivativeLiabilities",
       "weight": -1.0
      },
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DerivativeLiabilities",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of asset associated with financial liability or contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, and right to receive cash collateral under master netting arrangements.",
        "label": "Derivative Liability, Fair Value, Gross Asset and Right to Reclaim Cash, Offset",
        "negatedLabel": "Derivative Liability, Netting adjustments",
        "negatedTerseLabel": "Netting Adjustments and Cash Collateral-Derivative Liability"
       }
      }
     },
     "localname": "DerivativeLiabilityFairValueGrossAssetAndRightToReclaimCashOffset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement": {
     "auth_ref": [
      "r29"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DerivativeLiabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value, before effects of master netting arrangements, of a financial liability or contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset. Includes liabilities not subject to a master netting arrangement and elected not to be offset.",
        "label": "Derivative Liability, Fair Value, Gross Liability Including Not Subject to Master Netting Arrangement",
        "terseLabel": "Derivative Liabilities"
       }
      }
     },
     "localname": "DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeLiabilityNotSubjectToMasterNettingArrangement": {
     "auth_ref": [
      "r32",
      "r40"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_DerivativeLiabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of financial liability or contract with one or more underlyings, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, not subject to a master netting arrangement.",
        "label": "Derivative Liability, Not Subject to Master Netting Arrangement",
        "terseLabel": "Derivative Liability, Not Subject to Master Netting Arrangement"
       }
      }
     },
     "localname": "DerivativeLiabilityNotSubjectToMasterNettingArrangement",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeLineItems": {
     "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": "Derivative [Line Items]",
        "terseLabel": "Derivative [Line Items]"
       }
      }
     },
     "localname": "DerivativeLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativeNetLiabilityPositionAggregateFairValue": {
     "auth_ref": [
      "r294"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate fair value amounts of derivative instruments that contain credit-risk-related contingent features that are in a net liability position at the end of the reporting period. For nonderivative instruments that are designated and qualify as hedging instruments, the fair value amounts are the carrying value of the nonderivative hedging instrument, including the adjustment for the foreign currency transaction gain (loss) on that instrument.",
        "label": "Derivative, Net Liability Position, Aggregate Fair Value",
        "terseLabel": "Derivative, Net Liability Position, Aggregate Fair Value"
       }
      }
     },
     "localname": "DerivativeNetLiabilityPositionAggregateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeNotionalAmount": {
     "auth_ref": [
      "r269",
      "r271"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Nominal or face amount used to calculate payment on derivative.",
        "label": "Derivative, Notional Amount",
        "terseLabel": "Derivatives, Notional Amount"
       }
      }
     },
     "localname": "DerivativeNotionalAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DerivativeTable": {
     "auth_ref": [
      "r97",
      "r268",
      "r270",
      "r271",
      "r273",
      "r274",
      "r280",
      "r283",
      "r297",
      "r300",
      "r305"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule that describes and identifies a derivative or group of derivatives on a disaggregated basis, such as for individual instruments, or small groups of similar instruments. May include a combination of the type of instrument, risks being hedged, notional amount, hedge designation, related hedged item, inception date, maturity date, or other relevant item.",
        "label": "Derivative [Table]",
        "terseLabel": "Derivative [Table]"
       }
      }
     },
     "localname": "DerivativeTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativesEmbeddedDerivatives": {
     "auth_ref": [
      "r90",
      "r265",
      "r266",
      "r302",
      "r303"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for embedded derivatives, including how such derivatives are identified and analyzed for possible separation from their host contracts.",
        "label": "Derivatives, Embedded Derivatives [Policy Text Block]",
        "terseLabel": "Derivatives, Embedded Derivatives"
       }
      }
     },
     "localname": "DerivativesEmbeddedDerivatives",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DerivativesFairValueLineItems": {
     "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": "Derivatives, Fair Value [Line Items]",
        "terseLabel": "Derivatives, Fair Value [Line Items]"
       }
      }
     },
     "localname": "DerivativesFairValueLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DerivativesMethodsOfAccountingHedgingDerivatives": {
     "auth_ref": [
      "r98",
      "r293"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for derivatives used in hedging relationships, which may include how gains or losses are recognized and presented in the financial statements, and amortization policies for deferred amounts.",
        "label": "Derivatives, Methods of Accounting, Hedging Derivatives [Policy Text Block]",
        "terseLabel": "Derivatives, Methods of Accounting, Hedging Derivatives"
       }
      }
     },
     "localname": "DerivativesMethodsOfAccountingHedgingDerivatives",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DesignatedAsHedgingInstrumentMember": {
     "auth_ref": [
      "r273"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Derivative instrument designated as hedging instrument under Generally Accepted Accounting Principles (GAAP).",
        "label": "Designated as Hedging Instrument [Member]",
        "terseLabel": "Designated as Hedging Instrument"
       }
      }
     },
     "localname": "DesignatedAsHedgingInstrumentMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DividendPayableDateToBePaidDayMonthAndYear": {
     "auth_ref": [
      "r87"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Date the declared dividend will be paid, in CCYY-MM-DD format.",
        "label": "Dividends Payable, Date to be Paid",
        "terseLabel": "Dividends Payable, Date to be Paid"
       }
      }
     },
     "localname": "DividendPayableDateToBePaidDayMonthAndYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "dateItemType"
    },
    "us-gaap_DividendsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Dividends [Abstract]",
        "terseLabel": "Dividends [Abstract]"
       }
      }
     },
     "localname": "DividendsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DividendsCommonStockCash": {
     "auth_ref": [
      "r251"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of paid and unpaid common stock dividends declared with the form of settlement in cash.",
        "label": "Dividends, Common Stock, Cash",
        "negatedTerseLabel": "Cash dividends on capital stock"
       }
      }
     },
     "localname": "DividendsCommonStockCash",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DividendsPayableCurrentAndNoncurrent": {
     "auth_ref": [
      "r4",
      "r6",
      "r377",
      "r426"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of dividends declared but unpaid on equity securities issued by the entity and outstanding.",
        "label": "Dividends Payable",
        "terseLabel": "Dividends Payable"
       }
      }
     },
     "localname": "DividendsPayableCurrentAndNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EquityComponentDomain": {
     "auth_ref": [
      "r244"
     ],
     "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 [Domain]"
       }
      }
     },
     "localname": "EquityComponentDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EstimateOfFairValueFairValueDisclosureMember": {
     "auth_ref": [
      "r326"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Measured as an estimate of fair value.",
        "label": "Estimate of Fair Value Measurement [Member]",
        "terseLabel": "Estimate of Fair Value Measurement",
        "verboseLabel": "Estimated Fair Value"
       }
      }
     },
     "localname": "EstimateOfFairValueFairValueDisclosureMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ExcessCapital": {
     "auth_ref": [
      "r417"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount by which the company's Total Capital exceeds the minimum required for capital adequacy purposes.",
        "label": "Excess Capital",
        "terseLabel": "Excess Capital"
       }
      }
     },
     "localname": "ExcessCapital",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ExchangeClearedMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Transaction where an organization acts as an intermediary, reconciling orders between transacting parties.",
        "label": "Exchange Cleared [Member]",
        "terseLabel": "Cleared derivatives"
       }
      }
     },
     "localname": "ExchangeClearedMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable": {
     "auth_ref": [
      "r307",
      "r308",
      "r309",
      "r320"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTableTextBlock": {
     "auth_ref": [
      "r307",
      "r308",
      "r309",
      "r319",
      "r320"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of financial instruments measured at fair value, including those classified in shareholders' equity measured on a recurring or nonrecurring basis. Disclosures include, but are not limited to, fair value measurements recorded and the reasons for the measurements, level within the fair value hierarchy in which the fair value measurements are categorized and transfers between levels 1 and 2. Nonrecurring fair value measurements are those that are required or permitted in the statement of financial position in particular circumstances.",
        "label": "Fair Value Measurements, Recurring and Nonrecurring [Table Text Block]",
        "terseLabel": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis, Valuation Techniques"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisGainLossIncludedInEarnings": {
     "auth_ref": [
      "r313"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of gain (loss) recognized in income from asset and liability measured at fair value on recurring basis using unobservable input (level 3).",
        "label": "Fair Value, Assets and Liabilities Measured on Recurring Basis, Gain (Loss) Included in Earnings",
        "terseLabel": "Total amount of gain/(loss) for the period included in earnings attributable to the change in unrealized gains/losses relating to assets and liabilities still held at the end of the period"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisGainLossIncludedInEarnings",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain": {
     "auth_ref": [
      "r312"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Class of asset.",
        "label": "Asset Class [Domain]",
        "terseLabel": "Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation, by Asset Class [Domain]"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward]",
        "terseLabel": "Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward]"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems": {
     "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 Measured on Recurring Basis, Unobservable Input Reconciliation [Line Items]",
        "terseLabel": "Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Line Items]"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable": {
     "auth_ref": [
      "r312",
      "r320"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule of information required and determined to be provided for purposes of reconciling beginning and ending balances of fair value measurements of assets using significant unobservable inputs (level 3). Such reconciliation, separately presenting changes during the period, at a minimum, may include, but is not limited to: (1) total gains or losses for the period (realized and unrealized), segregating those gains or losses included in earnings (or changes in net assets) and gains or losses recognized in other comprehensive income, and a description of where those gains or losses included in earnings (or changes in net assets) are reported in the statement of income (or activities); (2) purchases, sales, issues, and settlements (each type disclosed separately); and (3) transfers in and transfers out of level 3 (for example, transfers due to changes in the observability of significant inputs), by class of asset.",
        "label": "Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Table]",
        "terseLabel": "Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Table]"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTextBlock": {
     "auth_ref": [
      "r312",
      "r320"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the fair value measurement of assets using significant unobservable inputs (Level 3), a reconciliation of the beginning and ending balances, separately presenting changes during the period attributable to the following: (1) total gains or losses for the period (realized and unrealized), segregating those gains or losses included in earnings (or changes in net assets) and gains or losses recognized in other comprehensive income (loss), and a description of where those gains or losses included in earnings (or changes in net assets) are reported in the statement of income (or activities); (2) purchases, sales, issues, and settlements (each type disclosed separately); and (3) transfers in and transfers out of Level 3 (for example, transfers due to changes in the observability of significant inputs), by class of asset.",
        "label": "Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Table Text Block]",
        "terseLabel": "Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems": {
     "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, Balance Sheet Grouping, Financial Statement Captions [Line Items]",
        "terseLabel": "Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items]"
       }
      }
     },
     "localname": "FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByAssetClassAxis": {
     "auth_ref": [
      "r307",
      "r320"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by class of asset.",
        "label": "Asset Class [Axis]",
        "terseLabel": "Fair Value by Asset Class [Axis]"
       }
      }
     },
     "localname": "FairValueByAssetClassAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByBalanceSheetGroupingTable": {
     "auth_ref": [
      "r307",
      "r327",
      "r328"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about the fair value of financial instruments, including financial assets and financial liabilities, and the measurements of those instruments, assets, and liabilities.",
        "label": "Fair Value, by Balance Sheet Grouping [Table]",
        "terseLabel": "Fair Value, by Balance Sheet Grouping [Table]"
       }
      }
     },
     "localname": "FairValueByBalanceSheetGroupingTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByBalanceSheetGroupingTextBlock": {
     "auth_ref": [
      "r307",
      "r327"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the fair value of financial instruments, including financial assets and financial liabilities, and the measurements of those instruments, assets, and liabilities.",
        "label": "Fair Value, by Balance Sheet Grouping [Table Text Block]",
        "terseLabel": "Fair Value, by Balance Sheet Grouping"
       }
      }
     },
     "localname": "FairValueByBalanceSheetGroupingTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueByFairValueHierarchyLevelAxis": {
     "auth_ref": [
      "r255",
      "r256",
      "r259",
      "r308",
      "r352"
     ],
     "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": "Fair Value Hierarchy and NAV [Axis]"
       }
      }
     },
     "localname": "FairValueByFairValueHierarchyLevelAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByMeasurementBasisAxis": {
     "auth_ref": [
      "r307",
      "r321"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by measurement basis.",
        "label": "Measurement Basis [Axis]",
        "terseLabel": "Measurement Basis [Axis]"
       }
      }
     },
     "localname": "FairValueByMeasurementBasisAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByMeasurementFrequencyAxis": {
     "auth_ref": [
      "r307",
      "r308",
      "r310",
      "r311",
      "r322"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by measurement frequency.",
        "label": "Measurement Frequency [Axis]",
        "terseLabel": "Fair Value by Measurement Frequency [Axis]"
       }
      }
     },
     "localname": "FairValueByMeasurementFrequencyAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueDisclosureItemAmountsDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Measurement basis, for example, but not limited to, reported value, fair value, portion at fair value, portion at other than fair value.",
        "label": "Fair Value Measurement [Domain]",
        "terseLabel": "Fair Value Measurement [Domain]"
       }
      }
     },
     "localname": "FairValueDisclosureItemAmountsDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueDisclosureOffbalanceSheetRisksFaceAmountLiability": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The face amount of financial liabilities, which are not recognized in the financial statements (off-balance sheet) because they fail to meet some other criterion for recognition.",
        "label": "Fair Value Disclosure, Off-balance Sheet Risks, Face Amount, Liability",
        "totalLabel": "Total"
       }
      }
     },
     "localname": "FairValueDisclosureOffbalanceSheetRisksFaceAmountLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Fair Value Disclosures [Abstract]"
       }
      }
     },
     "localname": "FairValueDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueDisclosuresTextBlock": {
     "auth_ref": [
      "r318"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for the fair value of financial instruments (as defined), including financial assets and financial liabilities (collectively, as defined), and the measurements of those instruments as well as disclosures related to the fair value of non-financial assets and liabilities. Such disclosures about the financial instruments, assets, and liabilities would include: (1) the fair value of the required items together with their carrying amounts (as appropriate); (2) for items for which it is not practicable to estimate fair value, disclosure would include: (a) information pertinent to estimating fair value (including, carrying amount, effective interest rate, and maturity, and (b) the reasons why it is not practicable to estimate fair value; (3) significant concentrations of credit risk including: (a) information about the activity, region, or economic characteristics identifying a concentration, (b) the maximum amount of loss the entity is exposed to based on the gross fair value of the related item, (c) policy for requiring collateral or other security and information as to accessing such collateral or security, and (d) the nature and brief description of such collateral or security; (4) quantitative information about market risks and how such risks are managed; (5) for items measured on both a recurring and nonrecurring basis information regarding the inputs used to develop the fair value measurement; and (6) for items presented in the financial statement for which fair value measurement is elected: (a) information necessary to understand the reasons for the election, (b) discussion of the effect of fair value changes on earnings, (c) a description of [similar groups] items for which the election is made and the relation thereof to the balance sheet, the aggregate carrying value of items included in the balance sheet that are not eligible for the election; (7) all other required (as defined) and desired information.",
        "label": "Fair Value Disclosures [Text Block]",
        "terseLabel": "Fair Value"
       }
      }
     },
     "localname": "FairValueDisclosuresTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValue"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueInputsLevel1Member": {
     "auth_ref": [
      "r255",
      "r256",
      "r259",
      "r308",
      "r353"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueInputsLevel2Member": {
     "auth_ref": [
      "r255",
      "r256",
      "r259",
      "r308",
      "r354"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueInputsLevel3Member": {
     "auth_ref": [
      "r255",
      "r256",
      "r259",
      "r308",
      "r355"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementFrequencyDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Measurement frequency.",
        "label": "Measurement Frequency [Domain]",
        "terseLabel": "Measurement Frequency [Domain]"
       }
      }
     },
     "localname": "FairValueMeasurementFrequencyDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInEarnings1": {
     "auth_ref": [
      "r313"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of gain (loss) recognized in income from asset measured at fair value on recurring basis using unobservable input (level 3).",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Gain (Loss) Included in Earnings",
        "terseLabel": "Interest income/(loss)"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInEarnings1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInOtherComprehensiveIncomeLoss": {
     "auth_ref": [
      "r314"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of gain (loss) recognized in other comprehensive income (OCI) from asset measured at fair value on recurring basis using unobservable input (level 3).",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Gain (Loss) Included in Other Comprehensive Income (Loss)",
        "negatedTerseLabel": "Unrealized gain/(loss) included in AOCI"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInOtherComprehensiveIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSettlements": {
     "auth_ref": [
      "r315"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of settlement of financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Settlements",
        "negatedTerseLabel": "Settlements"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSettlements",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue": {
     "auth_ref": [
      "r312"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset Value",
        "periodEndLabel": "Balance, end of the period",
        "periodStartLabel": "Balance, beginning of the period"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueMeasurementsFairValueHierarchyDomain": {
     "auth_ref": [],
     "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, Measurements, Fair Value Hierarchy [Domain]"
       }
      }
     },
     "localname": "FairValueMeasurementsFairValueHierarchyDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementsNonrecurringMember": {
     "auth_ref": [
      "r307",
      "r308",
      "r310",
      "r311",
      "r317",
      "r322"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Infrequent fair value measurement. Includes, but is not limited to, fair value adjustment for impairment of asset, liability or equity, not frequently measured at fair value.",
        "label": "Fair Value, Nonrecurring [Member]",
        "terseLabel": "Fair Value, Measurements, Nonrecurring"
       }
      }
     },
     "localname": "FairValueMeasurementsNonrecurringMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementsRecurringMember": {
     "auth_ref": [
      "r318",
      "r322"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Frequent fair value measurement. Includes, but is not limited to, fair value adjustment for impairment of asset, liability or equity, frequently measured at fair value.",
        "label": "Fair Value, Recurring [Member]",
        "terseLabel": "Fair Value, Measurements, Recurring"
       }
      }
     },
     "localname": "FairValueMeasurementsRecurringMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueOfFinancialInstrumentsPolicy": {
     "auth_ref": [
      "r90",
      "r323",
      "r325"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for determining the fair value of financial instruments.",
        "label": "Fair Value of Financial Instruments, Policy [Policy Text Block]",
        "terseLabel": "Fair Value of Financial Instruments, Policy"
       }
      }
     },
     "localname": "FairValueOfFinancialInstrumentsPolicy",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueOptionAggregateDifferencesLongTermDebtInstruments": {
     "auth_ref": [
      "r332"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents the difference between the aggregate fair value and the aggregate unpaid principal balance of long-term debt instruments that have contractual principal amounts and for which the fair value option has been elected.",
        "label": "Fair Value, Option, Aggregate Differences, Long-term Debt Instruments",
        "negatedTerseLabel": "Fair Value Over/(Under) Principal Balance, CO Bonds"
       }
      }
     },
     "localname": "FairValueOptionAggregateDifferencesLongTermDebtInstruments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueOptionChangesInFairValueGainLoss1": {
     "auth_ref": [
      "r334"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_NoninterestIncome",
       "weight": 1.0
      }
     },
     "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": "Net gain/(loss) on advances and net (gain)/loss on consolidated obligation bonds from changes in fair value recognized in earnings"
       }
      }
     },
     "localname": "FairValueOptionChangesInFairValueGainLoss1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueOptionQuantitativeDisclosuresLineItems": {
     "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, Option, Quantitative Disclosures [Line Items]",
        "terseLabel": "Fair Value, Option, Quantitative Disclosures [Line Items]"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueOptionQuantitativeDisclosuresTable": {
     "auth_ref": [
      "r335",
      "r336",
      "r337"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about asset and liability measured at fair value under fair value option.",
        "label": "Fair Value Option, Disclosures [Table]",
        "terseLabel": "Fair Value Option, Disclosures [Table]"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueOptionQuantitativeDisclosuresTextBlock": {
     "auth_ref": [
      "r333",
      "r335",
      "r336",
      "r337"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of information about asset and liability measured at fair value under fair value option.",
        "label": "Fair Value Option, Disclosures [Table Text Block]",
        "terseLabel": "Fair Value, Option, Quantitative Disclosures"
       }
      }
     },
     "localname": "FairValueOptionQuantitativeDisclosuresTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueTransferPolicyPolicyTextBlock": {
     "auth_ref": [
      "r309",
      "r316",
      "r319"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for determining when transfers between levels are recognized.",
        "label": "Fair Value Transfer, Policy [Policy Text Block]",
        "terseLabel": "Fair Value Transfer, Policy"
       }
      }
     },
     "localname": "FairValueTransferPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable": {
     "auth_ref": [
      "r275",
      "r280",
      "r301"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule that discloses the location and fair value amounts of derivative instruments (and nonderivative instruments that are designated and qualify as hedging instruments) reported in the statement of financial position.",
        "label": "Fair Values Derivatives, Balance Sheet Location, by Derivative Contract Type [Table]",
        "terseLabel": "Fair Values Derivatives, Balance Sheet Location, by Derivative Contract Type [Table]"
       }
      }
     },
     "localname": "FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalFundsSold": {
     "auth_ref": [
      "r389"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 4.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount outstanding of funds lent to other depository institutions, securities brokers, or securities dealers in the form of Federal Funds sold; for example, immediately available funds lent under agreements or contracts that mature in one business day or roll over under a continuing contract, regardless of the nature of the transaction or the collateral involved, excluding overnight lending for commercial and industrial purposes. Also include Federal Funds sold under agreements to resell on a gross basis, excluding (1) sales of term Federal Funds, (2) due bills representing purchases of securities or other assets by the reporting bank that have not yet been delivered and similar instruments, (3) resale agreements that mature in more than one business day involving assets other than securities, and (4) yield maintenance dollar repurchase agreements.",
        "label": "Federal Funds Sold",
        "terseLabel": "Federal funds sold"
       }
      }
     },
     "localname": "FederalFundsSold",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvances": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 7.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of Federal Home Loan Bank (FHLBank) advances to member financial institutions.",
        "label": "Federal Home Loan Bank Advances",
        "terseLabel": "Advances (includes $4,334 and $4,370 at fair value under the fair value option, respectively)",
        "totalLabel": "Total",
        "verboseLabel": "Advances"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvances",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesByInterestRateTypeAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Bank, Advances, by Interest Rate Type [Abstract]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesByInterestRateTypeAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesCallableOptionMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Right but not the obligation the borrower has to return the advance to the Federal Home Loan Bank (FHLBank) at par without prepayment penalty.",
        "label": "Federal Home Loan Bank, Advances, Callable Option [Member]",
        "terseLabel": "Advances, Callable Option"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesCallableOptionMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateAfterRollingYearFive": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next call date after the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Call Date, after Rolling Year Five",
        "terseLabel": "After 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateAfterRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInNextRollingTwelveMonths": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next call date within the next rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Call Date, in Next Rolling Twelve Months",
        "terseLabel": "Within 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInNextRollingTwelveMonths",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInRollingYearFive": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next call date within the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Call Date, in Rolling Year Five",
        "terseLabel": "After 4 years through 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInRollingYearFour": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next call date within the fourth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Call Date, in Rolling Year Four",
        "terseLabel": "After 3 years through 4 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInRollingYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInRollingYearThree": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next call date within the third rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Call Date, in Rolling Year Three",
        "terseLabel": "After 2 years through 3 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInRollingYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInRollingYearTwo": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next call date within the second rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Call Date, in Rolling Year Two",
        "terseLabel": "After 1 year through 2 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateInRollingYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateRollingYearParValueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Call Date, Rolling Year, Par Value [Abstract]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextCallDateRollingYearParValueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateAfterRollingYearFive": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next put or convert date after the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Put or Convert Date, after Rolling Year Five",
        "terseLabel": "After 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateAfterRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInNextRollingTwelveMonths": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next put or convert date within the next rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Put or Convert Date, in Next Rolling Twelve Months",
        "terseLabel": "Within 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInNextRollingTwelveMonths",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInRollingYearFive": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next put or convert date within the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Put or Convert Date, in Rolling Year Five",
        "terseLabel": "After 4 years through 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInRollingYearFour": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next put or convert date within the fourth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Put or Convert Date, in Rolling Year Four",
        "terseLabel": "After 3 years through 4 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInRollingYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInRollingYearThree": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next put or convert date within the third rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Put or Convert Date, in Rolling Year Three",
        "terseLabel": "After 2 years through 3 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInRollingYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInRollingYearTwo": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with the earlier of contractual maturity or next put or convert date within the second rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Put or Convert Date, in Rolling Year Two",
        "terseLabel": "After 1 year through 2 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateInRollingYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateRollingYearParValueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Bank, Advances, Earlier of Contractual Maturity or Next Put or Convert Date, Rolling Year, Par Value [Abstract]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesEarlierOfContractualMaturityOrNextPutOrConvertDateRollingYearParValueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesFixedRate": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with fixed interest rate.",
        "label": "Federal Home Loan Bank, Advances, Fixed Rate",
        "totalLabel": "Advances, Total Fixed Rate"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFixedRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesFixedRateAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Bank, Advances, Fixed Rate [Abstract]",
        "terseLabel": "Federal Home Loan Bank, Advances, Fixed Rate [Abstract]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFixedRateAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesFixedRateAfterOneYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesFixedRate",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with fixed interest rate maturing more than one year after the latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Fixed Rate, after One Year",
        "terseLabel": "Fixed Rate, due after 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFixedRateAfterOneYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesFixedRateUnderOneYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesFixedRate",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with fixed interest rate maturing within one year of the latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Fixed Rate, under One Year",
        "terseLabel": "Fixed Rate, due within 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFixedRateUnderOneYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesFloatingRate": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with floating interest rate.",
        "label": "Federal Home Loan Bank, Advances, Floating Rate",
        "totalLabel": "Advances, Total Adjustable Rate"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFloatingRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesFloatingRateAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Bank, Advances, Floating Rate [Abstract]",
        "terseLabel": "Federal Home Loan Bank, Advances, Floating Rate [Abstract]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFloatingRateAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesFloatingRateAfterOneYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesFloatingRate",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with floating interest rate maturing more than one year after the latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Floating Rate, after One Year",
        "terseLabel": "Adjustable Rate, due after 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFloatingRateAfterOneYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesFloatingRateUnderOneYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesFloatingRate",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) with floating interest rate maturing within one year after the latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Floating Rate, under One Year",
        "terseLabel": "Adjustable Rate, due within 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesFloatingRateUnderOneYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesInterestRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest rate of advances made and reported by Federal Home Loan Bank (FHLBank).",
        "label": "Federal Home Loan Bank, Advances, Interest Rate",
        "terseLabel": "Advances, Interest Rate"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesInterestRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesLineItems": {
     "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": "Federal Home Loan Bank, Advances [Line Items]",
        "terseLabel": "Advances [Line Items]",
        "verboseLabel": "Federal Home Loan Bank, Advances [Line Items]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturitiesSummaryAfterRollingYearFive": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) maturing after the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Maturities Summary, after Rolling Year Five",
        "terseLabel": "After 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturitiesSummaryAfterRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturitiesSummaryInNextRollingTwelveMonths": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the next rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Maturities Summary, in Next Rolling Twelve Months",
        "terseLabel": "Within 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturitiesSummaryInNextRollingTwelveMonths",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturitiesSummaryInRollingYearFive": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Maturities Summary, in Rolling Year Five",
        "terseLabel": "After 4 years through 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturitiesSummaryInRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturitiesSummaryInRollingYearFour": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the fourth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Maturities Summary, in Rolling Year Four",
        "terseLabel": "After 3 years through 4 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturitiesSummaryInRollingYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturitiesSummaryInRollingYearThree": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the third rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Maturities Summary, in Rolling Year Three",
        "terseLabel": "After 2 years through 3 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturitiesSummaryInRollingYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturitiesSummaryInRollingYearTwo": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvancesParValue",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the second rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Maturities Summary, in Rolling Year Two",
        "terseLabel": "After 1 year through 2 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturitiesSummaryInRollingYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturityPeriodFixedRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Maturity period on fixed rate advances made and reported by Federal Home Loan Bank (FHLBank), in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Federal Home Loan Bank, Advances, Maturity Period, Fixed Rate",
        "terseLabel": "Advances, Maturity Period, Fixed Rate"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturityPeriodFixedRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturityPeriodVariableRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Maturity period on variable rate advances made and reported by Federal Home Loan Bank (FHLBank), in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Federal Home Loan Bank, Advances, Maturity Period, Variable Rate",
        "terseLabel": "Advances, Maturity Period, Variable Rate"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturityPeriodVariableRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesMaturityRollingYearAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Bank, Advances, Maturity, Rolling Year [Abstract]",
        "terseLabel": "Federal Home Loan Bank Advances, Maturities [Abstract]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesMaturityRollingYearAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesOptionAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information about the options related to the advances made and reported by Federal Home Loan Bank (FHLBank), including but not limited to callable, putable and convertible options.",
        "label": "Federal Home Loan Bank, Advances, Option [Axis]",
        "terseLabel": "Federal Home Loan Bank, Advances, Option [Axis]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesOptionAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesOptionDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Options related to the advances made and reported by Federal Home Loan Bank (FHLBank), including but not limited to callable, putable and convertible options.",
        "label": "Federal Home Loan Bank, Advances, Option [Domain]",
        "terseLabel": "Federal Home Loan Bank, Advances, Option [Domain]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesOptionDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesParValue": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvances",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Par amount of advances made and reported by Federal Home Loan Bank (FHLBank).",
        "label": "Federal Home Loan Bank, Advances, Par Value",
        "terseLabel": "Advances Outstanding",
        "totalLabel": "Total par value",
        "verboseLabel": "Advances, Par Value"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesParValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/AdvancesEarlierOfContractualMaturityOrNextCallPutDateDetails",
      "http://www.fhlbsf.com/role/AdvancesInterestRatePaymentTermsAndPrepaymentFeesDetails",
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesPutableOptionMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Right, but not the obligation, Federal Home Loan Bank (FHLBank) has to require the borrower to return the advance at par.",
        "label": "Federal Home Loan Bank, Advances, Putable Option [Member]",
        "terseLabel": "Advances, Putable Option"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesPutableOptionMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about advances made and reported by Federal Home Loan Bank (FHLBank).",
        "label": "Federal Home Loan Bank, Advances [Table]",
        "terseLabel": "Federal Home Loan Bank, Advances [Table]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/AdvancesNarrativeDetails",
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of advances made and reported by Federal Home Loan Bank (FHLBank).",
        "label": "Federal Home Loan Bank, Advances [Table Text Block]",
        "terseLabel": "Federal Home Loan Bank, Advances"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesTextBlock": {
     "auth_ref": [
      "r421"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure of advances made and reported by Federal Home Loan Bank (FHLBank).",
        "label": "Federal Home Loan Bank, Advances [Text Block]",
        "terseLabel": "Federal Home Loan Bank, Advances [Text Block]",
        "verboseLabel": "Advances"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/Advances",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesValuationAdjustmentsForHedgingActivities": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvances",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated increase (decrease) on advances made and reported by Federal Home Loan Bank (FHLBank) from hedging adjustments.",
        "label": "Federal Home Loan Bank, Advances, Valuation Adjustments for Hedging Activities",
        "terseLabel": "Valuation adjustments for hedging activities"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesValuationAdjustmentsForHedgingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesValuationAdjustmentsUnderFairValueOption": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_FederalHomeLoanBankAdvances",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated increase (decrease) on advances made and reported by Federal Home Loan Bank (FHLBank) from fair value option adjustments.",
        "label": "Federal Home Loan Bank, Advances, Valuation Adjustments under Fair Value Option",
        "terseLabel": "Valuation adjustments under fair value option",
        "verboseLabel": "Fair Value Over/(Under) Principal Balance, Advances"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesValuationAdjustmentsUnderFairValueOption",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesWeightedAverageInterestRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate on advances made and reported by Federal Home Loan Bank (FHLBank).",
        "label": "Federal Home Loan Bank, Advances, Weighted Average Interest Rate",
        "terseLabel": "Total par value"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWeightedAverageInterestRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesWeightedAverageInterestRateAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Bank, Advances, Weighted Average Interest Rate [Abstract]",
        "terseLabel": "Federal Home Loan Bank Advances, Weighted Average Interest Rate [Abstract]"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWeightedAverageInterestRateAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingAfterRollingYearFive": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate on advances made and reported by Federal Home Loan Bank (FHLBank) maturing after the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Weighted Average Interest Rate, Maturing after Rolling Year Five",
        "terseLabel": "After 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingAfterRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInNextTwelveRollingMonths": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate on advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the next rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Weighted Average Interest Rate, Maturing in Next Twelve Rolling Months",
        "terseLabel": "Within 1 year"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInNextTwelveRollingMonths",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInRollingYearFive": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate on advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Weighted Average Interest Rate, Maturing in Rolling Year Five",
        "terseLabel": "After 4 years through 5 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInRollingYearFour": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate on advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the fourth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank, Advances, Weighted Average Interest Rate, Maturing in Rolling Year Four",
        "terseLabel": "After 3 years through 4 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInRollingYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInRollingYearThree": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate on advances made and reported by Federal Home Loan Bank maturing in the third rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank Advances, Weighted Average Interest Rate, Maturing in Rolling Year Three",
        "terseLabel": "After 2 years through 3 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInRollingYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInRollingYearTwo": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate on advances made and reported by Federal Home Loan Bank (FHLBank) maturing in the second rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Federal Home Loan Bank Advances, Weighted Average Interest Rate, Maturing in Rolling Year Two",
        "terseLabel": "After 1 year through 2 years"
       }
      }
     },
     "localname": "FederalHomeLoanBankAdvancesWeightedAverageInterestRateMaturingInRollingYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankConsolidatedObligations": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 2.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of joint and several obligations consisting of consolidated obligation bonds and discount notes issued by Federal Home Loan Banks (FHLBanks).",
        "label": "Federal Home Loan Bank, Consolidated Obligations",
        "terseLabel": "Federal Home Loan Bank, Consolidated Obligations",
        "totalLabel": "Total consolidated obligations"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligations",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankConsolidatedObligationsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Bank, Consolidated Obligations [Abstract]",
        "terseLabel": "Consolidated obligations:"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanBankConsolidatedObligationsBonds": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 1.0,
       "parentTag": "us-gaap_FederalHomeLoanBankConsolidatedObligations",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of joint and several obligations consisting of bonds issued by Federal Home Loan Banks (FHLBanks).",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Bonds",
        "terseLabel": "Bonds (includes $254 and $337 at fair value under the fair value option, respectively)",
        "verboseLabel": "Total"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsBonds",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankConsolidatedObligationsDiscountNotes": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 2.0,
       "parentTag": "us-gaap_FederalHomeLoanBankConsolidatedObligations",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of joint and several obligations consisting of discount notes issued by Federal Home Loan Banks (FHLBanks).",
        "label": "Federal Home Loan Bank, Consolidated Obligations, Discount Notes",
        "terseLabel": "Total",
        "verboseLabel": "Discount notes"
       }
      }
     },
     "localname": "FederalHomeLoanBankConsolidatedObligationsDiscountNotes",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankLeverageCapitalActual": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of leveraged capital of Federal Home Loan Bank (FHLBank), set by the Federal Housing Finance Agency (FHFA).",
        "label": "Federal Home Loan Bank, Leverage Capital, Actual",
        "terseLabel": "Leverage Capital, Actual"
       }
      }
     },
     "localname": "FederalHomeLoanBankLeverageCapitalActual",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankLeverageCapitalRequired": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Minimum amount of leverage capital required for Federal Home Loan Bank (FHLBank), set by the Federal Housing Finance Agency (FHFA).",
        "label": "Federal Home Loan Bank, Leverage Capital, Required",
        "terseLabel": "Leverage Capital, Required"
       }
      }
     },
     "localname": "FederalHomeLoanBankLeverageCapitalRequired",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankLeverageRatioActual1": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Leverage ratio of Federal Home Loan Bank (FHLBank), calculated per regulations of the Federal Housing Finance Agency (FHFA).",
        "label": "Federal Home Loan Bank, Leverage Ratio, Actual",
        "terseLabel": "Leverage Ratio, Actual"
       }
      }
     },
     "localname": "FederalHomeLoanBankLeverageRatioActual1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankRegulatoryCapitalActual": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of regulatory capital of Federal Home Loan Bank (FHLBank), set by the Federal Housing Finance Agency (FHFA).",
        "label": "Federal Home Loan Bank, Regulatory Capital, Actual",
        "terseLabel": "Regulatory Capital, Actual"
       }
      }
     },
     "localname": "FederalHomeLoanBankRegulatoryCapitalActual",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankRegulatoryCapitalRatioActual": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Regulatory capital ratio of Federal Home Loan Bank (FHLBank), calculated per regulations of the Federal Housing Finance Agency (FHFA).",
        "label": "Federal Home Loan Bank, Regulatory Capital Ratio, Actual",
        "terseLabel": "Regulatory Capital Ratio, Actual"
       }
      }
     },
     "localname": "FederalHomeLoanBankRegulatoryCapitalRatioActual",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FederalHomeLoanBankRegulatoryCapitalRequired": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Minimum amount of regulatory capital required for Federal Home Loan Bank (FHLBank), set by the Federal Housing Finance Agency (FHFA).",
        "label": "Federal Home Loan Bank, Regulatory Capital, Required",
        "terseLabel": "Regulatory Capital, Required"
       }
      }
     },
     "localname": "FederalHomeLoanBankRegulatoryCapitalRequired",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankRiskBasedCapitalActual": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of risk-based capital of Federal Home Loan Bank (FHLBank), set by the Federal Housing Finance Agency (FHFA).",
        "label": "Federal Home Loan Bank, Risk-Based Capital, Actual",
        "terseLabel": "Risk-Based Capital, Actual"
       }
      }
     },
     "localname": "FederalHomeLoanBankRiskBasedCapitalActual",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBankRiskBasedCapitalRequired": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Minimum amount of risk-based capital required for Federal Home Loan Bank (FHLBank), set by the Federal Housing Finance Agency (FHFA).",
        "label": "Federal Home Loan Bank, Risk-Based Capital, Required",
        "terseLabel": "Risk-Based Capital, Required"
       }
      }
     },
     "localname": "FederalHomeLoanBankRiskBasedCapitalRequired",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FederalHomeLoanBanksAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Federal Home Loan Banks [Abstract]"
       }
      }
     },
     "localname": "FederalHomeLoanBanksAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_FederalHomeLoanMortgageCorporationCertificatesAndObligationsFHLMCMember": {
     "auth_ref": [
      "r384"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Investments in debentures, bonds and other debt securities issued by the Federal Home Loan Mortgage Corporation (FHLMC or Freddie Mac).",
        "label": "Federal Home Loan Mortgage Corporation Certificates and Obligations (FHLMC) [Member]",
        "terseLabel": "Freddie Mac"
       }
      }
     },
     "localname": "FederalHomeLoanMortgageCorporationCertificatesAndObligationsFHLMCMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FederalNationalMortgageAssociationCertificatesAndObligationsFNMAMember": {
     "auth_ref": [
      "r384"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Investments in debentures, bonds and other debt securities issued by the Federal National Mortgage Association (FNMA or Fannie Mae).",
        "label": "Federal National Mortgage Association Certificates and Obligations (FNMA) [Member]",
        "terseLabel": "Fannie Mae"
       }
      }
     },
     "localname": "FederalNationalMortgageAssociationCertificatesAndObligationsFNMAMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinanceLoanAndLeaseReceivablesHeldForInvestmentAllowanceAndNonperformingLoansNonperformingLoansPolicy": {
     "auth_ref": [
      "r90",
      "r126",
      "r134"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for (1) placing loans on nonaccrual status (or discontinuing accrual of interest) and recording payments received on nonaccrual loans, and the policy for resuming accrual of interest, (2) charging-off uncollectible loans, and (3) determining past due or delinquency status (that is, whether past due status is based on how recently payments have been received or contractual terms).",
        "label": "Finance, Loan and Lease Receivables, Held-for-investment, Allowance and Nonperforming Loans, Nonperforming Loans Policy [Policy Text Block]",
        "terseLabel": "Finance, Loan and Lease Receivables, Held-for-investment, Allowance and Nonperforming Loans, Nonperforming Loans Policy [Policy Text Block]"
       }
      }
     },
     "localname": "FinanceLoanAndLeaseReceivablesHeldForInvestmentAllowanceAndNonperformingLoansNonperformingLoansPolicy",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FinancialInstrumentAxis": {
     "auth_ref": [
      "r181",
      "r182",
      "r183",
      "r187",
      "r191",
      "r202",
      "r203",
      "r206",
      "r207"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of financial instrument.",
        "label": "Financial Instrument [Axis]",
        "terseLabel": "Financial Instrument [Axis]",
        "verboseLabel": "Schedule of Available-for-sale Securities, Major Types of Debt and Equity Securities [Axis]"
       }
      }
     },
     "localname": "FinancialInstrumentAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details",
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails",
      "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancialInstrumentPerformanceStatusAxis": {
     "auth_ref": [
      "r191"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by category of performance or non-performance status of financial instruments.",
        "label": "Financial Instrument Performance Status [Axis]",
        "terseLabel": "Financial Instrument Performance Status [Axis]"
       }
      }
     },
     "localname": "FinancialInstrumentPerformanceStatusAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancialInstrumentPerformanceStatusDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Category of performance or non-performance status of financial instruments, including but not limited to, financing receivables, loans, debt, and investments.",
        "label": "Financial Instrument Performance Status [Domain]",
        "terseLabel": "Financial Instrument Performance Status [Domain]"
       }
      }
     },
     "localname": "FinancialInstrumentPerformanceStatusDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancialInstrumentsSubjectToMandatoryRedemptionNumberOfStockholders1": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of stockholders holding financial instruments subject to mandatory redemption.",
        "label": "Financial Instruments Subject to Mandatory Redemption, Number of Stockholders",
        "terseLabel": "Financial Instruments Subject to Mandatory Redemption, Number of Stockholders"
       }
      }
     },
     "localname": "FinancialInstrumentsSubjectToMandatoryRedemptionNumberOfStockholders1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_FinancialInstrumentsSubjectToMandatoryRedemptionPastContractualRedemptionDateDueToOutstandingActivity": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_SharesSubjectToMandatoryRedemptionSettlementTermsAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of mandatorily redeemable capital stock past the contractual redemption date due to outstanding activity.",
        "label": "Financial Instruments Subject to Mandatory Redemption, Past Contractual Redemption Date, Due to Outstanding Activity",
        "terseLabel": "Past contractual redemption date because of remaining activity"
       }
      }
     },
     "localname": "FinancialInstrumentsSubjectToMandatoryRedemptionPastContractualRedemptionDateDueToOutstandingActivity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancialInstrumentsSubjectToMandatoryRedemptionRedeemableInYearTwo": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_SharesSubjectToMandatoryRedemptionSettlementTermsAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of mandatorily redeemable capital stock maturing in year two following the date of the latest balance sheet.",
        "label": "Financial Instruments Subject to Mandatory Redemption, Redeemable in Year Two",
        "terseLabel": "After 1 year through 2 years"
       }
      }
     },
     "localname": "FinancialInstrumentsSubjectToMandatoryRedemptionRedeemableInYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancialInstrumentsSubjectToMandatoryRedemptionRedeemableWithinOneYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_SharesSubjectToMandatoryRedemptionSettlementTermsAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of mandatorily redeemable capital stock maturing within one year following the date of the latest balance sheet.",
        "label": "Financial Instruments Subject to Mandatory Redemption, Redeemable within One year",
        "terseLabel": "Within 1 year"
       }
      }
     },
     "localname": "FinancialInstrumentsSubjectToMandatoryRedemptionRedeemableWithinOneYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancingReceivableChangeInMethodCreditLossExpenseReversal": {
     "auth_ref": [
      "r180"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of credit loss expense (reversal of expense) for financing receivable from change in methodology.",
        "label": "Financing Receivable, Change in Method, Credit Loss Expense (Reversal)",
        "terseLabel": "Cumulative accounting change for CECL"
       }
      }
     },
     "localname": "FinancingReceivableChangeInMethodCreditLossExpenseReversal",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancingReceivableNonaccrualNoAllowance": {
     "auth_ref": [
      "r186"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of financing receivable on nonaccrual status with no allowance for credit loss.",
        "label": "Financing Receivable, Nonaccrual, No Allowance",
        "terseLabel": "Financing Receivable, Nonaccrual, No Allowance"
       }
      }
     },
     "localname": "FinancingReceivableNonaccrualNoAllowance",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear": {
     "auth_ref": [
      "r192",
      "r198"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of financing receivable originated five or more years prior to latest fiscal year.",
        "label": "Financing Receivable, Originated Five or More Years before Latest Fiscal Year",
        "terseLabel": "Originated Five or More Years before Latest Fiscal Year"
       }
      }
     },
     "localname": "FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancingReceivablePortfolioSegmentAxis": {
     "auth_ref": [
      "r181",
      "r182",
      "r193"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by the level at which an entity develops and documents a systematic methodology to determine its allowance for credit losses.",
        "label": "Financing Receivable Portfolio Segment [Axis]",
        "terseLabel": "Financing Receivable Portfolio Segment"
       }
      }
     },
     "localname": "FinancingReceivablePortfolioSegmentAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivablePortfolioSegmentDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Level at which an entity develops and documents a systematic methodology to determine its allowance for credit losses.",
        "label": "Financing Receivable Portfolio Segment [Domain]",
        "terseLabel": "Financing Receivable Portfolio Segment"
       }
      }
     },
     "localname": "FinancingReceivablePortfolioSegmentDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivableRecordedInvestment90DaysPastDueAndStillAccruing": {
     "auth_ref": [
      "r136",
      "r185",
      "r199"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of financing receivable 90 days or more past due and still accruing.",
        "label": "Financing Receivable, 90 Days or More Past Due, Still Accruing",
        "terseLabel": "Loans past due 90 days or more and still accruing interest"
       }
      }
     },
     "localname": "FinancingReceivableRecordedInvestment90DaysPastDueAndStillAccruing",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis": {
     "auth_ref": [
      "r131",
      "r137",
      "r138",
      "r183",
      "r187",
      "r191",
      "r194",
      "r195",
      "r198",
      "r199"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by class of financing receivable determined on the basis of initial measurement attribute, risk characteristics and method of monitoring and assessing credit risk.",
        "label": "Class of Financing Receivable [Axis]",
        "terseLabel": "Class of Financing Receivable [Axis]"
       }
      }
     },
     "localname": "FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financing receivables determined on the basis of initial measurement attribute, risk characteristics and method of monitoring and assessing credit risk.",
        "label": "Class of Financing Receivable [Domain]",
        "terseLabel": "Class of Financing Receivable [Domain]"
       }
      }
     },
     "localname": "FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivableRecordedInvestmentCurrent": {
     "auth_ref": [
      "r183",
      "r199"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of financing receivable not past due.",
        "label": "Financing Receivable, Not Past Due",
        "terseLabel": "Total current loans"
       }
      }
     },
     "localname": "FinancingReceivableRecordedInvestmentCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancingReceivableRecordedInvestmentNonaccrualStatus": {
     "auth_ref": [
      "r135",
      "r184"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of financing receivable on nonaccrual status.",
        "label": "Financing Receivable, Nonaccrual",
        "terseLabel": "Nonaccrual loans"
       }
      }
     },
     "localname": "FinancingReceivableRecordedInvestmentNonaccrualStatus",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancingReceivableRecordedInvestmentPastDue": {
     "auth_ref": [
      "r138",
      "r183",
      "r199"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of financing receivable past due.",
        "label": "Financing Receivable, Past Due",
        "terseLabel": "Total past due"
       }
      }
     },
     "localname": "FinancingReceivableRecordedInvestmentPastDue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems": {
     "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": "Financing Receivable, Past Due [Line Items]",
        "terseLabel": "Financing Receivable, Past Due [Line Items]"
       }
      }
     },
     "localname": "FinancingReceivableRecordedInvestmentPastDueLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivables30To59DaysPastDueMember": {
     "auth_ref": [
      "r199"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial asset more than 29 days past due but fewer than 60 days past due.",
        "label": "Financial Asset, 30 to 59 Days Past Due [Member]",
        "terseLabel": "30 \u2013 59 days delinquent"
       }
      }
     },
     "localname": "FinancingReceivables30To59DaysPastDueMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivables60To89DaysPastDueMember": {
     "auth_ref": [
      "r199"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial asset more than 59 days past due but fewer than 90 days past due.",
        "label": "Financial Asset, 60 to 89 Days Past Due [Member]",
        "terseLabel": "60 \u2013 89 days delinquent"
       }
      }
     },
     "localname": "FinancingReceivables60To89DaysPastDueMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivablesEqualToGreaterThan90DaysPastDueMember": {
     "auth_ref": [
      "r199"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Financial asset equal to or greater than 90 days past due.",
        "label": "Financial Asset, Equal to or Greater than 90 Days Past Due [Member]",
        "terseLabel": "90 days or more delinquent"
       }
      }
     },
     "localname": "FinancingReceivablesEqualToGreaterThan90DaysPastDueMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivablesPeriodPastDueAxis": {
     "auth_ref": [
      "r183",
      "r199"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by time period financial asset is past due.",
        "label": "Financial Asset, Period Past Due [Axis]",
        "terseLabel": "Financial Asset, Period Past Due [Axis]"
       }
      }
     },
     "localname": "FinancingReceivablesPeriodPastDueAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivablesPeriodPastDueDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Period in which financial asset is past due. Element name and standard label in Financial Asset, [numeric lower end] to [numeric higher end] [date measure] Past Due [Member] or Financial Asset, Greater Than [low end numeric value] [date measure] Past Due [Member] or Financial Asset, Less Than [high end numeric value] [date measure] Past Due [Member] formats.",
        "label": "Financial Asset, Period Past Due [Domain]",
        "terseLabel": "Financial Asset, Period Past Due [Domain]"
       }
      }
     },
     "localname": "FinancingReceivablesPeriodPastDueDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivablesTextBlock": {
     "auth_ref": [
      "r141",
      "r142"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for financing receivable.",
        "label": "Financing Receivables [Text Block]",
        "terseLabel": "Mortgage Loans Held for Portfolio"
       }
      }
     },
     "localname": "FinancingReceivablesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolio"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ForwardContractsMember": {
     "auth_ref": [
      "r285"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contracts negotiated between two parties to purchase and sell a specific quantity of a financial instrument, foreign currency, or commodity at a price specified at origination of the contract, with delivery and settlement at a specified future date.",
        "label": "Forward Contracts [Member]",
        "terseLabel": "Mortgage delivery commitments",
        "verboseLabel": "Commitments to purchase mortgage loans"
       }
      }
     },
     "localname": "ForwardContractsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_GainLossOnDerivativeInstrumentsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Primary financial statement caption encompassing gain (loss) on derivative instruments.",
        "label": "Gain (Loss) on Derivative Instruments [Member]",
        "terseLabel": "Gain (Loss) on Derivative and Hedging Activities"
       }
      }
     },
     "localname": "GainLossOnDerivativeInstrumentsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_GainLossOnDerivativeInstrumentsNetPretax": {
     "auth_ref": [
      "r276"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate net gain (loss) on all derivative instruments recognized in earnings during the period, before tax effects.",
        "label": "Gain (Loss) on Derivative Instruments, Net, Pretax",
        "terseLabel": "Gain (Loss) on Derivative Instruments"
       }
      }
     },
     "localname": "GainLossOnDerivativeInstrumentsNetPretax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GuaranteeObligationsByNatureAxis": {
     "auth_ref": [
      "r230"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by nature of guarantee.",
        "label": "Guarantor Obligations, Nature [Axis]",
        "terseLabel": "Guarantor Obligations, Nature [Axis]"
       }
      }
     },
     "localname": "GuaranteeObligationsByNatureAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_GuaranteeObligationsNatureDomain": {
     "auth_ref": [
      "r227"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents a description of the nature of the guarantee or each group of similar guarantees.",
        "label": "Guarantor Obligations, Nature [Domain]",
        "terseLabel": "Guarantor Obligations, Nature [Domain]"
       }
      }
     },
     "localname": "GuaranteeObligationsNatureDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_GuaranteeObligationsTerm": {
     "auth_ref": [
      "r228"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Describe the approximate term of the guarantee or each group of similar guarantees.",
        "label": "Guarantor Obligations, Term",
        "terseLabel": "Guarantor Obligations, Term"
       }
      }
     },
     "localname": "GuaranteeObligationsTerm",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_GuaranteeOfIndebtednessOfOthersMember": {
     "auth_ref": [
      "r223",
      "r260",
      "r438"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Agreements (contracts) that contingently require the guarantor to make payments of principal and interest to a lender on another party's debt if that party fails to comply with the terms of the borrowing arrangement.",
        "label": "Guarantee of Indebtedness of Others [Member]",
        "terseLabel": "Guarantee of Indebtedness of Others"
       }
      }
     },
     "localname": "GuaranteeOfIndebtednessOfOthersMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_HedgedAssetDiscontinuedFairValueHedgeCumulativeIncreaseDecrease": {
     "auth_ref": [
      "r292"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cumulative increase (decrease) in fair value of hedged asset in fair value hedge, attributable to hedged risk, remaining after discontinued hedge.",
        "label": "Hedged Asset, Discontinued Fair Value Hedge, Cumulative Increase (Decrease)",
        "terseLabel": "Basis Adjustment for Hedged Asset, Discontinued Fair Value Hedge, Cumulative Increase (Decrease)"
       }
      }
     },
     "localname": "HedgedAssetDiscontinuedFairValueHedgeCumulativeIncreaseDecrease",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HedgedAssetFairValueHedge": {
     "auth_ref": [
      "r290"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of asset hedged in fair value hedging relationship.",
        "label": "Hedged Asset, Fair Value Hedge",
        "terseLabel": "Amortized Cost of Hedged Asset, Fair Value Hedge"
       }
      }
     },
     "localname": "HedgedAssetFairValueHedge",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HedgedAssetFairValueHedgeCumulativeIncreaseDecrease": {
     "auth_ref": [
      "r291"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cumulative increase (decrease) in fair value of hedged asset in fair value hedge, attributable to hedged risk.",
        "label": "Hedged Asset, Fair Value Hedge, Cumulative Increase (Decrease)",
        "terseLabel": "Hedged Asset, Fair Value Hedge, Cumulative Increase (Decrease)"
       }
      }
     },
     "localname": "HedgedAssetFairValueHedgeCumulativeIncreaseDecrease",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HedgedLiabilityDiscontinuedFairValueHedgeCumulativeIncreaseDecrease": {
     "auth_ref": [
      "r292"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cumulative increase (decrease) in fair value of hedged liability in fair value hedge, attributable to hedged risk, remaining after discontinued hedge.",
        "label": "Hedged Liability, Discontinued Fair Value Hedge, Cumulative Increase (Decrease)",
        "terseLabel": "Basis Adjustment for Hedged Liability, Discontinued Fair Value Hedge, Cumulative Increase (Decrease)"
       }
      }
     },
     "localname": "HedgedLiabilityDiscontinuedFairValueHedgeCumulativeIncreaseDecrease",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HedgedLiabilityFairValueHedge": {
     "auth_ref": [
      "r290"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of liability hedged in fair value hedging relationship.",
        "label": "Hedged Liability, Fair Value Hedge",
        "terseLabel": "Amortized Cost of Hedged Liability, Fair Value Hedge"
       }
      }
     },
     "localname": "HedgedLiabilityFairValueHedge",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HedgedLiabilityFairValueHedgeCumulativeIncreaseDecrease": {
     "auth_ref": [
      "r291"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cumulative increase (decrease) in fair value of hedged liability in fair value hedge, attributable to hedged risk.",
        "label": "Hedged Liability, Fair Value Hedge, Cumulative Increase (Decrease)",
        "terseLabel": "Hedged Liability, Fair Value Hedge, Cumulative Increase (Decrease)"
       }
      }
     },
     "localname": "HedgedLiabilityFairValueHedgeCumulativeIncreaseDecrease",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HedgingDesignationAxis": {
     "auth_ref": [
      "r273",
      "r289"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by designation of purpose of derivative instrument.",
        "label": "Hedging Designation [Axis]",
        "terseLabel": "Hedging Designation [Axis]"
       }
      }
     },
     "localname": "HedgingDesignationAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_HedgingDesignationDomain": {
     "auth_ref": [
      "r273"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Designation of purpose of derivative instrument.",
        "label": "Hedging Designation [Domain]",
        "terseLabel": "Hedging Designation [Domain]"
       }
      }
     },
     "localname": "HedgingDesignationDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_HedgingRelationshipDomain": {
     "auth_ref": [
      "r273"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Nature or intent of a hedge.",
        "label": "Hedging Relationship [Domain]",
        "terseLabel": "Hedging Relationship [Domain]"
       }
      }
     },
     "localname": "HedgingRelationshipDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesCumulativeAdjustmentsTableDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_HeldToMaturitySecurities": {
     "auth_ref": [
      "r147",
      "r161"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 6.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-maturity",
        "terseLabel": "Held-to-maturity (HTM) securities (fair values were $6,867 and $7,566, respectively)",
        "totalLabel": "HTM securities, Carrying Value",
        "verboseLabel": "HTM securities, Carrying Value"
       }
      }
     },
     "localname": "HeldToMaturitySecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain": {
     "auth_ref": [
      "r163"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated unrecognized gain on investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-maturity, Accumulated Unrecognized Gain",
        "terseLabel": "Gross Unrecognized Holding Gain"
       }
      }
     },
     "localname": "HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss": {
     "auth_ref": [
      "r164"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated unrealized loss on investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-maturity, Accumulated Unrecognized Loss",
        "negatedTerseLabel": "Gross Unrecognized Holding Loss"
       }
      }
     },
     "localname": "HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HeldToMaturitySecuritiesAmortizedCostBeforeOtherThanTemporaryImpairment": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, before other-than-temporary impairment (OTTI) accretion, of investment in debt securities measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-maturity, Amortized Cost, before Other-than-temporary Impairment",
        "terseLabel": "Amortized Cost"
       }
      }
     },
     "localname": "HeldToMaturitySecuritiesAmortizedCostBeforeOtherThanTemporaryImpairment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HeldToMaturitySecuritiesFairValue": {
     "auth_ref": [
      "r162"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-maturity, Fair Value",
        "terseLabel": "HTM Securities, Fair Value",
        "verboseLabel": "Fair Value of Held-to-maturity securities"
       }
      }
     },
     "localname": "HeldToMaturitySecuritiesFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HeldToMaturitySecuritiesRestricted": {
     "auth_ref": [
      "r358",
      "r437"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of restricted investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-maturity, Restricted",
        "terseLabel": "HTM securities pledged as collateral that may be repledged"
       }
      }
     },
     "localname": "HeldToMaturitySecuritiesRestricted",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_HeldToMaturitySecuritiesTextBlock": {
     "auth_ref": [
      "r166"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of information about investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-maturity [Table Text Block]",
        "terseLabel": "Held-to-maturity Securities"
       }
      }
     },
     "localname": "HeldToMaturitySecuritiesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_HeldtomaturitySecuritiesMember": {
     "auth_ref": [
      "r174"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Investments in debt securities classified as held-to-maturity.",
        "label": "Held-to-maturity Securities [Member]",
        "terseLabel": "Held-to-maturity Securities"
       }
      }
     },
     "localname": "HeldtomaturitySecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments": {
     "auth_ref": [
      "r96"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/SegmentInformationDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_NetIncomeLossAttributableToParentNetOfFederalHomeLoanBankAssessments",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of income (loss) from continuing operations before deduction of income tax expense (benefit) and income (loss) attributable to noncontrolling interest, and addition of income (loss) from equity method investments.",
        "label": "Income (Loss) from Continuing Operations before Equity Method Investments, Income Taxes, Noncontrolling Interest",
        "terseLabel": "Income/(Loss) Before Assessment",
        "totalLabel": "Income/(Loss) Before AHP Assessment"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeStatementAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Income Statement [Abstract]"
       }
      }
     },
     "localname": "IncomeStatementAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeStatementLocationAxis": {
     "auth_ref": [
      "r209"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by location in the income statement.",
        "label": "Income Statement Location [Axis]",
        "terseLabel": "Income Statement Location [Axis]"
       }
      }
     },
     "localname": "IncomeStatementLocationAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeStatementLocationDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Location in the income statement.",
        "label": "Income Statement Location [Domain]",
        "terseLabel": "Income Statement Location [Domain]"
       }
      }
     },
     "localname": "IncomeStatementLocationDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet": {
     "auth_ref": [
      "r80"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the amount due from borrowers for interest payments.",
        "label": "Increase (Decrease) in Accrued Interest Receivable, Net",
        "negatedLabel": "Accrued interest receivable"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccruedInterestReceivableNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInFairValueAdjustmentsOnAssetsAndLiabilitiesCarriedAtFairValueUnderFairValueOption": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in fair value adjustment on other assets (liabilities) carried at fair value under the fair value option on the statement of cash flows of Federal Home Loan Banks (FHLBanks).",
        "label": "Increase (Decrease) in Fair Value Adjustments on Other Assets (Liabilities) Carried at Fair Value under Fair Value Option",
        "negatedLabel": "Change in net fair value adjustment on advances and consolidated obligation bonds held under the fair value option"
       }
      }
     },
     "localname": "IncreaseDecreaseInFairValueAdjustmentsOnAssetsAndLiabilitiesCarriedAtFairValueUnderFairValueOption",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInFederalFundsSold": {
     "auth_ref": [
      "r76",
      "r79",
      "r407"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net cash inflow or outflow from the fund lent to other financial institution arising from the excess in reserve deposited at Federal Reserve Bank to meet legal requirement. This borrowing is usually contracted on an overnight basis at an agreed rate of interest.",
        "label": "Increase (Decrease) in Federal Funds Sold",
        "terseLabel": "Federal funds sold"
       }
      }
     },
     "localname": "IncreaseDecreaseInFederalFundsSold",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInInterestPayableNet": {
     "auth_ref": [
      "r80"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in interest payable, which represents the amount owed to note holders, bond holders, and other parties for interest earned on loans or credit extended to the reporting entity.",
        "label": "Increase (Decrease) in Interest Payable, Net",
        "terseLabel": "Accrued interest payable"
       }
      }
     },
     "localname": "IncreaseDecreaseInInterestPayableNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInLoansFromOtherFederalHomeLoanBanks": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in loans from another Federal Home Loan Bank (FHLBank).",
        "label": "Increase (Decrease) in Loans from Federal Home Loan Banks",
        "terseLabel": "Net change in borrowings from other FHLBanks"
       }
      }
     },
     "localname": "IncreaseDecreaseInLoansFromOtherFederalHomeLoanBanks",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOperatingCapitalAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Increase (Decrease) in Operating Capital [Abstract]",
        "terseLabel": "Net change in:"
       }
      }
     },
     "localname": "IncreaseDecreaseInOperatingCapitalAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncreaseDecreaseInOtherOperatingAssets": {
     "auth_ref": [
      "r80"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in operating assets classified as other.",
        "label": "Increase (Decrease) in Other Operating Assets",
        "negatedLabel": "Other assets"
       }
      }
     },
     "localname": "IncreaseDecreaseInOtherOperatingAssets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOtherOperatingLiabilities": {
     "auth_ref": [
      "r80"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 8.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in operating liabilities classified as other.",
        "label": "Increase (Decrease) in Other Operating Liabilities",
        "terseLabel": "Other liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInOtherOperatingLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInStockholdersEquityRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Increase (Decrease) in Stockholders' Equity [Roll Forward]",
        "terseLabel": "Increase (Decrease) in Stockholders' Equity [Roll Forward]"
       }
      }
     },
     "localname": "IncreaseDecreaseInStockholdersEquityRollForward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncreaseDecreaseInTradingSecurities": {
     "auth_ref": [
      "r75",
      "r80"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 9.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) of investment in debt and equity securities, measured at fair value with changes in fair value recognized in net income.",
        "label": "Increase (Decrease) in Debt Securities, Trading, and Equity Securities, FV-NI",
        "negatedTerseLabel": "Change in net fair value of Trading Securities"
       }
      }
     },
     "localname": "IncreaseDecreaseInTradingSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InformationByCategoryOfDebtSecurityAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by category of debt security, either available-for-sale or held-to-maturity.",
        "label": "Debt Security Category [Axis]",
        "terseLabel": "Debt Security Category [Axis]"
       }
      }
     },
     "localname": "InformationByCategoryOfDebtSecurityAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InterestAndDividendIncomeOperating": {
     "auth_ref": [
      "r396"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the total of interest and dividend income, including any amortization and accretion (as applicable) of discounts and premiums, earned from (1) loans and leases whether held-for-sale or held-in-portfolio; (2) investment securities; (3) federal funds sold; (4) securities purchased under agreements to resell; (5) investments in banker's acceptances, commercial paper, or certificates of deposit; (6) dividend income; or (7) other investments not otherwise specified herein.",
        "label": "Interest and Dividend Income, Operating",
        "totalLabel": "Total Interest Income"
       }
      }
     },
     "localname": "InterestAndDividendIncomeOperating",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestAndDividendIncomeOperatingAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Interest and Dividend Income, Operating [Abstract]",
        "terseLabel": "Interest Income:"
       }
      }
     },
     "localname": "InterestAndDividendIncomeOperatingAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InterestAndDividendIncomeSecuritiesAvailableForSale": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 6.0,
       "parentTag": "us-gaap_InterestAndDividendIncomeOperating",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of operating dividend and interest income, including amortization and accretion of premiums and discounts, on available-for-sale securities.",
        "label": "Interest and Dividend Income, Securities, Operating, Available-for-sale",
        "terseLabel": "AFS securities"
       }
      }
     },
     "localname": "InterestAndDividendIncomeSecuritiesAvailableForSale",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestAndDividendIncomeSecuritiesHeldToMaturity": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 7.0,
       "parentTag": "us-gaap_InterestAndDividendIncomeOperating",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of operating interest income, including amortization and accretion of premiums and discounts, on held-to-maturity securities.",
        "label": "Interest Income, Debt Securities, Held-to-maturity",
        "terseLabel": "HTM securities"
       }
      }
     },
     "localname": "InterestAndDividendIncomeSecuritiesHeldToMaturity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestAndDividendIncomeSecuritiesTradingOrMeasuredAtFairValue": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 5.0,
       "parentTag": "us-gaap_InterestAndDividendIncomeOperating",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of operating dividend and interest income, including amortization and accretion of premiums and discounts, on trading securities and other forms of securities that provide ownership interests.",
        "label": "Interest and Dividend Income, Securities, Operating, Trading or Measured at Fair Value",
        "terseLabel": "Trading securities"
       }
      }
     },
     "localname": "InterestAndDividendIncomeSecuritiesTradingOrMeasuredAtFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestAndDividendsPayableCurrent": {
     "auth_ref": [
      "r21"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sum of the carrying values as of the balance sheet date of (a) interest payable on all forms of debt, including trade payables, that has been incurred, and (b) dividends declared but unpaid on equity securities issued by the entity and outstanding (also includes dividends collected on behalf of another owner of securities that are being held by the entity). Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Interest and Dividends Payable, Current",
        "terseLabel": "Interest and Dividends Payable, Current"
       }
      }
     },
     "localname": "InterestAndDividendsPayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestAndFeeIncomeLoansConsumerRealEstate": {
     "auth_ref": [
      "r395"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 8.0,
       "parentTag": "us-gaap_InterestAndDividendIncomeOperating",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest and fee income generated from loans secured by one- to four-family residential properties. This item excludes home equity lines-of-credit.",
        "label": "Interest and Fee Income, Loans, Consumer, Real Estate",
        "terseLabel": "Mortgage loans held for portfolio"
       }
      }
     },
     "localname": "InterestAndFeeIncomeLoansConsumerRealEstate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestBearingDepositLiabilitiesDomestic": {
     "auth_ref": [
      "r383"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/DepositsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DepositsDomestic",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total amount of interest-bearing domestic deposit liabilities, which may include brokered, retail, demand, checking, notice of withdrawal, money market and other interest-bearing deposits.",
        "label": "Interest-bearing Deposit Liabilities, Domestic",
        "terseLabel": "Interest-bearing Deposits - Adjustable rate"
       }
      }
     },
     "localname": "InterestBearingDepositLiabilitiesDomestic",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestBearingDepositsInBanks": {
     "auth_ref": [
      "r373",
      "r388"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 2.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For banks and other depository institutions (including Federal Reserve Banks, if applicable): Interest-bearing deposits in other financial institutions for relatively short periods of time including, for example, certificates of deposits, which are presented separately from cash on the balance sheet.",
        "label": "Interest-bearing Deposits in Banks and Other Financial Institutions",
        "terseLabel": "Interest-bearing deposits"
       }
      }
     },
     "localname": "InterestBearingDepositsInBanks",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestBearingDepositsMember": {
     "auth_ref": [
      "r373",
      "r379"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cash on deposit with financial institutions that earns interest, either at a fixed or market rate.",
        "label": "Interest-bearing Deposits [Member]",
        "terseLabel": "Interest-bearing Deposits [Member]"
       }
      }
     },
     "localname": "InterestBearingDepositsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails",
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InterestExpense": {
     "auth_ref": [
      "r58",
      "r116",
      "r339",
      "r342",
      "r406"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of the cost of borrowed funds accounted for as interest expense.",
        "label": "Interest Expense",
        "totalLabel": "Total Interest Expense"
       }
      }
     },
     "localname": "InterestExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestExpenseAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Interest Expense [Abstract]",
        "terseLabel": "Interest Expense:"
       }
      }
     },
     "localname": "InterestExpenseAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InterestExpenseCapitalSecurities": {
     "auth_ref": [
      "r405"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 3.0,
       "parentTag": "us-gaap_InterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest expense incurred during the reporting period on capital securities issued by the reporting entity.",
        "label": "Interest Expense, Capital Securities",
        "terseLabel": "Mandatorily redeemable capital stock",
        "verboseLabel": "Interest Expense on Mandatorily Redeemable Capital Stock"
       }
      }
     },
     "localname": "InterestExpenseCapitalSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/SegmentInformationDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestExpenseDomesticDeposits": {
     "auth_ref": [
      "r403"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 4.0,
       "parentTag": "us-gaap_InterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate interest expense incurred on all domestic deposits.",
        "label": "Interest Expense, Domestic Deposits",
        "terseLabel": "Deposits"
       }
      }
     },
     "localname": "InterestExpenseDomesticDeposits",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestExpenseMember": {
     "auth_ref": [
      "r287"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Primary financial statement caption encompassing interest expense.",
        "label": "Interest Expense [Member]",
        "terseLabel": "Interest Expense [Member]"
       }
      }
     },
     "localname": "InterestExpenseMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InterestExpenseOtherLongTermDebt": {
     "auth_ref": [
      "r405"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_InterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of interest expense incurred on long-term debt classified as other, including, but not limited to, interest on long-term notes and amortization of issuance costs.",
        "label": "Interest Expense, Other Long-term Debt",
        "negatedTerseLabel": "Bonds",
        "terseLabel": "Bonds"
       }
      }
     },
     "localname": "InterestExpenseOtherLongTermDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestExpenseOtherShortTermBorrowings": {
     "auth_ref": [
      "r404"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_InterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest expense incurred during the reporting period on other short-term borrowings.",
        "label": "Interest Expense, Other Short-term Borrowings",
        "terseLabel": "Discount notes"
       }
      }
     },
     "localname": "InterestExpenseOtherShortTermBorrowings",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestIncomeDepositsWithFinancialInstitutions": {
     "auth_ref": [
      "r402"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_InterestAndDividendIncomeOperating",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest income derived from funds deposited with both domestic and foreign financial institutions including funds in money market and other accounts.",
        "label": "Interest Income, Deposits with Financial Institutions",
        "terseLabel": "Interest-bearing deposits"
       }
      }
     },
     "localname": "InterestIncomeDepositsWithFinancialInstitutions",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss": {
     "auth_ref": [
      "r399"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/SegmentInformationDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments",
       "weight": 1.0
      },
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of interest income or expense, including any amortization and accretion (as applicable) of discounts and premiums, including consideration of the provisions for loan, lease, credit, and other related losses.",
        "label": "Interest Income (Expense), after Provision for Loan Loss",
        "totalLabel": "Net Interest Income After Provision for/(Reversal of) Credit Losses",
        "verboseLabel": "Net Interest Income After Provision for/(Reversal of) Credit Losses"
       }
      }
     },
     "localname": "InterestIncomeExpenseAfterProvisionForLoanLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestIncomeExpenseNet": {
     "auth_ref": [
      "r397"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net amount of operating interest income (expense).",
        "label": "Interest Income (Expense), Net",
        "terseLabel": "Net Interest Income"
       }
      }
     },
     "localname": "InterestIncomeExpenseNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestIncomeFederalFundsSold": {
     "auth_ref": [
      "r402"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 4.0,
       "parentTag": "us-gaap_InterestAndDividendIncomeOperating",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest income on federal funds sold. Federal funds sold represent the excess federal funds held by one commercial bank which it lends to another commercial bank, usually at an agreed-upon (federal funds) rate of interest. Such loans generally are of short-duration (overnight).",
        "label": "Interest Income, Federal Funds Sold",
        "terseLabel": "Federal funds sold"
       }
      }
     },
     "localname": "InterestIncomeFederalFundsSold",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestIncomeFederalHomeLoanBankAdvances": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_InterestAndDividendIncomeOperating",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of interest income from Federal Home Loan Bank (FHLBank) advances to member financial institutions.",
        "label": "Interest Income, Federal Home Loan Bank Advances",
        "terseLabel": "Advances"
       }
      }
     },
     "localname": "InterestIncomeFederalHomeLoanBankAdvances",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestIncomeMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Primary financial statement caption in which reported facts about interest income have been included.",
        "label": "Interest Income [Member]",
        "terseLabel": "Percentage of Total Interest Income from Advances",
        "verboseLabel": "Interest Income [Member]"
       }
      }
     },
     "localname": "InterestIncomeMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesCreditAndConcentrationRiskDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InterestIncomeSecuritiesPurchasedUnderAgreementsToResell": {
     "auth_ref": [
      "r402"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 3.0,
       "parentTag": "us-gaap_InterestAndDividendIncomeOperating",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest income derived from securities purchased under agreements to resell. The difference in the price at which the institution buys the securities and resells the securities represents interest for the use of the funds by the other party. Most repurchase and sale agreements involve obligations of the federal government or its agencies, but other financial instruments, such as commercial paper, banker's acceptances and negotiable certificates of deposits are sometimes used in such transactions.",
        "label": "Interest Income, Securities Purchased under Agreements to Resell",
        "terseLabel": "Securities purchased under agreements to resell"
       }
      }
     },
     "localname": "InterestIncomeSecuritiesPurchasedUnderAgreementsToResell",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestPaidNet": {
     "auth_ref": [
      "r74",
      "r77",
      "r86"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash paid for interest, excluding capitalized interest, classified as operating activity. Includes, but is not limited to, payment to settle zero-coupon bond for accreted interest of debt discount and debt instrument with insignificant coupon interest rate in relation to effective interest rate of borrowing attributable to accreted interest of debt discount.",
        "label": "Interest Paid, Excluding Capitalized Interest, Operating Activities",
        "terseLabel": "Interest paid"
       }
      }
     },
     "localname": "InterestPaidNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestPayableCurrent": {
     "auth_ref": [
      "r1",
      "r2",
      "r21"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of [accrued] interest payable on all forms of debt, including trade payables, that has been incurred and is unpaid. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Interest Payable, Current",
        "terseLabel": "Interest Payable, Current"
       }
      }
     },
     "localname": "InterestPayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestPayableCurrentAndNoncurrent": {
     "auth_ref": [
      "r385",
      "r431"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 4.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of interest payable on debt, including, but not limited to, trade payables.",
        "label": "Interest Payable",
        "terseLabel": "Accrued interest payable"
       }
      }
     },
     "localname": "InterestPayableCurrentAndNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestRateContractMember": {
     "auth_ref": [
      "r255",
      "r286"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Derivative instrument whose primary underlying risk is tied to the right to receive or pay a sum of money at a given interest rate.",
        "label": "Interest Rate Contract [Member]",
        "terseLabel": "Interest Rate Contract [Member]"
       }
      }
     },
     "localname": "InterestRateContractMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InterestRateSwapMember": {
     "auth_ref": [
      "r286"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Forward based contracts in which two parties agree to swap periodic payments that are fixed at the outset of the swap contract with variable payments based on a market interest rate (index rate) over a specified period.",
        "label": "Interest Rate Swap [Member]",
        "terseLabel": "Interest rate swaps",
        "verboseLabel": "Interest rate swaps"
       }
      }
     },
     "localname": "InterestRateSwapMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InterestReceivable": {
     "auth_ref": [
      "r26"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 9.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying amount as of the balance sheet date of interest earned but not received. Also called accrued interest or accrued interest receivable.",
        "label": "Interest Receivable",
        "terseLabel": "Accrued interest receivable",
        "verboseLabel": "Accrued interest receivable"
       }
      }
     },
     "localname": "InterestReceivable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestRevenueExpenseNet": {
     "auth_ref": [
      "r117"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of interest revenue (income derived from investments in debt securities and on cash and cash equivalents) net of interest expense (cost of borrowed funds accounted for as interest).",
        "label": "Interest Revenue (Expense), Net",
        "terseLabel": "Adjusted Net Interest Income"
       }
      }
     },
     "localname": "InterestRevenueExpenseNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InternalCreditAssessmentAxis": {
     "auth_ref": [
      "r130",
      "r191",
      "r197",
      "r198",
      "r229",
      "r296"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by entity-defined rating.",
        "label": "Internal Credit Assessment [Axis]",
        "terseLabel": "Internal Credit Assessment [Axis]"
       }
      }
     },
     "localname": "InternalCreditAssessmentAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InternalCreditAssessmentDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Entity defined credit risk rating.",
        "label": "Internal Credit Assessment [Domain]",
        "terseLabel": "Internal Credit Assessment [Domain]"
       }
      }
     },
     "localname": "InternalCreditAssessmentDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InvestmentPolicyTextBlock": {
     "auth_ref": [
      "r178"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for investment in financial asset.",
        "label": "Investment, Policy [Policy Text Block]",
        "terseLabel": "Investment, Policy"
       }
      }
     },
     "localname": "InvestmentPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_InvestmentTypeAxis": {
     "auth_ref": [
      "r440",
      "r441",
      "r442",
      "r443"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of investments.",
        "label": "Investment Type [Axis]",
        "terseLabel": "Investment Type [Axis]"
       }
      }
     },
     "localname": "InvestmentTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InvestmentTypeCategorizationMember": {
     "auth_ref": [
      "r440",
      "r441",
      "r442",
      "r443"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Asset obtained to generate income or appreciate in value.",
        "label": "Investments [Domain]",
        "terseLabel": "Investments [Domain]"
       }
      }
     },
     "localname": "InvestmentTypeCategorizationMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InvestmentsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Investments [Abstract]"
       }
      }
     },
     "localname": "InvestmentsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_InvestmentsClassifiedByContractualMaturityDateTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of maturities of an entity's investments as well as any other information pertinent to the investments.",
        "label": "Investments Classified by Contractual Maturity Date [Table Text Block]",
        "verboseLabel": "Investments Classified by Contractual Maturity Date [Table Text Block]"
       }
      }
     },
     "localname": "InvestmentsClassifiedByContractualMaturityDateTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_InvestmentsDebtAndEquitySecuritiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Investments, Debt and Equity Securities [Abstract]"
       }
      }
     },
     "localname": "InvestmentsDebtAndEquitySecuritiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_InvestmentsInDebtAndMarketableEquitySecuritiesAndCertainTradingAssetsDisclosureTextBlock": {
     "auth_ref": [
      "r177",
      "r372",
      "r412",
      "r444"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for  investments in certain debt and equity securities.",
        "label": "Investments in Debt and Marketable Equity Securities (and Certain Trading Assets) Disclosure [Text Block]",
        "terseLabel": "Available-for-Sale Securities"
       }
      }
     },
     "localname": "InvestmentsInDebtAndMarketableEquitySecuritiesAndCertainTradingAssetsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNotes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LaborAndRelatedExpense": {
     "auth_ref": [
      "r59"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_NoninterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expense for salary, wage, profit sharing; incentive and equity-based compensation; and other employee benefit.",
        "label": "Labor and Related Expense",
        "terseLabel": "Compensation and benefits"
       }
      }
     },
     "localname": "LaborAndRelatedExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Liabilities": {
     "auth_ref": [
      "r20"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 1.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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Liabilities [Abstract]",
        "terseLabel": "Liabilities:"
       }
      }
     },
     "localname": "LiabilitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquity": {
     "auth_ref": [
      "r16",
      "r380",
      "r429"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "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 Capital"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Liabilities and Equity [Abstract]",
        "terseLabel": "Liabilities and Capital"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesFairValueDisclosure": {
     "auth_ref": [
      "r307"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of financial and nonfinancial obligations.",
        "label": "Financial and Nonfinancial Liabilities, Fair Value Disclosure",
        "terseLabel": "Total recurring fair value measurements \u2013 Liabilities"
       }
      }
     },
     "localname": "LiabilitiesFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesFairValueDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Liabilities, Fair Value Disclosure [Abstract]",
        "terseLabel": "Liabilities"
       }
      }
     },
     "localname": "LiabilitiesFairValueDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LoanOriginationCommitmentsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Commitments to borrowers or third party investors for the origination of a loan.",
        "label": "Loan Origination Commitments [Member]",
        "terseLabel": "Loan Origination Commitments [Member]"
       }
      }
     },
     "localname": "LoanOriginationCommitmentsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LoansAndLeasesReceivableAllowance": {
     "auth_ref": [
      "r127",
      "r129",
      "r140",
      "r143",
      "r391"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LoansAndLeasesReceivableNetReportedAmount",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of allowance to cover probable credit losses on loans and leases. Includes carryover of or adjustments to the allowance for loan losses in connection with business combinations. Excludes allowance for loans and leases covered under loss sharing agreements.",
        "label": "Loans and Leases Receivable, Allowance",
        "negatedTerseLabel": "Less: Allowance for credit losses",
        "verboseLabel": "Allowance for credit losses on mortgage loans"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableAllowance",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LoansAndLeasesReceivableBeforeFeesGross": {
     "auth_ref": [
      "r125"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LoansAndLeasesReceivableGrossCarryingAmount",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, before allowance and fees, of loans and leases receivable. Excludes loans and leases covered under loss sharing agreements.",
        "label": "Loans and Leases Receivable, before Fees, Gross",
        "terseLabel": "Unpaid principal balance"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableBeforeFeesGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LoansAndLeasesReceivableDisclosureLineItems": {
     "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": "Loans and Leases Receivable Disclosure [Line Items]",
        "terseLabel": "Loans and Leases Receivable Disclosure [Line Items]"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableDisclosureLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LoansAndLeasesReceivableDisclosureTable": {
     "auth_ref": [
      "r125"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about loans and leases receivable.",
        "label": "Loans and Leases Receivable Disclosure [Table]",
        "terseLabel": "Loans and Leases Receivable Disclosure [Table]"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableDisclosureTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioAllowanceNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LoansAndLeasesReceivableGrossCarryingAmount": {
     "auth_ref": [
      "r125"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LoansAndLeasesReceivableNetReportedAmount",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before allowance of loans and leases held in portfolio, including but not limited to, commercial and consumer loans. Includes deferred interest and fees, undisbursed portion of loan balance, unamortized costs and premiums and discounts from face amounts. Excludes loans and leases covered under loss sharing agreements.",
        "label": "Loans and Leases Receivable, Gross",
        "totalLabel": "Mortgage loans held for portfolio"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableGrossCarryingAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LoansAndLeasesReceivableNetOfDeferredIncome": {
     "auth_ref": [
      "r125",
      "r133"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before allowance and after deduction of deferred interest and fees, unamortized costs and premiums and discounts from face amounts, of loans and leases held in portfolio, including but not limited to, commercial and consumer loans. Excludes loans and leases covered under loss sharing agreements.",
        "label": "Loans and Leases Receivable, Net of Deferred Income",
        "terseLabel": "Total Amortized Cost"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableNetOfDeferredIncome",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LoansAndLeasesReceivableNetReportedAmount": {
     "auth_ref": [
      "r125",
      "r392"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 8.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after allowance and deduction of deferred interest and fees, unamortized costs and premiums and discounts from face amounts, of loans and leases held in portfolio, including but not limited to, commercial and consumer loans. Excludes loans and leases covered under loss sharing agreements and loans held for sale.",
        "label": "Loans and Leases Receivable, Net Amount",
        "terseLabel": "Mortgage loans held for portfolio, net",
        "totalLabel": "Total mortgage loans held for portfolio, net",
        "verboseLabel": "Mortgage loans held for portfolio"
       }
      }
     },
     "localname": "LoansAndLeasesReceivableNetReportedAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition",
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LoansReceivableFairValueDisclosure": {
     "auth_ref": [
      "r141"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of loan receivable, including, but not limited to, mortgage loans held for investment, finance receivables held for investment, policy loans on insurance contracts.",
        "label": "Loans Receivable, Fair Value Disclosure",
        "terseLabel": "Mortgage loans held for portfolio, net of allowance for credit losses on mortgage loans",
        "verboseLabel": "Mortgage loans held for portfolio"
       }
      }
     },
     "localname": "LoansReceivableFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextRollingTwelveMonths": {
     "auth_ref": [
      "r100"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails": {
       "order": 1.0,
       "parentTag": "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsPar",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the next rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Next Rolling Twelve Months",
        "terseLabel": "Within 1 year"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInNextRollingTwelveMonths",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingAfterYearFive": {
     "auth_ref": [
      "r100"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails": {
       "order": 6.0,
       "parentTag": "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsPar",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing after the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Rolling after Year Five",
        "terseLabel": "After 5 years"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingAfterYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingYearFive": {
     "auth_ref": [
      "r100"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails": {
       "order": 5.0,
       "parentTag": "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsPar",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the fifth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Rolling Year Five",
        "terseLabel": "After 4 years through 5 years"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingYearFour": {
     "auth_ref": [
      "r100"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails": {
       "order": 4.0,
       "parentTag": "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsPar",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the fourth rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Rolling Year Four",
        "terseLabel": "After 3 years through 4 years"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingYearThree": {
     "auth_ref": [
      "r100"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails": {
       "order": 3.0,
       "parentTag": "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsPar",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the third rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Rolling Year Three",
        "terseLabel": "After 2 years through 3 years"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingYearTwo": {
     "auth_ref": [
      "r100"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails": {
       "order": 2.0,
       "parentTag": "fhlbsf_FederalHomeLoanBankConsolidatedObligationsBondsPar",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the second rolling twelve months following the latest balance sheet. For interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Rolling Year Two",
        "terseLabel": "After 1 year through 2 years"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInRollingYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsByEarlierOfContractualMaturityOrNextCallDateDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongtermDebtTypeAxis": {
     "auth_ref": [
      "r22"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of long-term debt.",
        "label": "Long-term Debt, Type [Axis]",
        "terseLabel": "Long-term Debt, Type [Axis]"
       }
      }
     },
     "localname": "LongtermDebtTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LongtermDebtTypeDomain": {
     "auth_ref": [
      "r22",
      "r234"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Type of long-term debt arrangement, such as notes, line of credit, commercial paper, asset-based financing, project financing, letter of credit financing. These are debt arrangements that originally required repayment more than twelve months after issuance or greater than the normal operating cycle of the company, if longer.",
        "label": "Long-term Debt, Type [Domain]",
        "terseLabel": "Long-term Debt, Type [Domain]"
       }
      }
     },
     "localname": "LongtermDebtTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsInterestRatePaymentTermsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LongtermDebtWeightedAverageInterestRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate of long-term debt outstanding calculated at point in time.",
        "label": "Long-term Debt, Weighted Average Interest Rate, at Point in Time",
        "terseLabel": "Total par amount"
       }
      }
     },
     "localname": "LongtermDebtWeightedAverageInterestRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_LossContingenciesByNatureOfContingencyAxis": {
     "auth_ref": [
      "r215",
      "r216",
      "r217",
      "r218",
      "r219",
      "r220",
      "r221",
      "r225",
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of existing condition, situation, or set of circumstances involving uncertainty as to possible loss to an enterprise that will ultimately be resolved when one or more future events occur or fail to occur.",
        "label": "Loss Contingency Nature [Axis]",
        "terseLabel": "Loss Contingency Nature [Axis]"
       }
      }
     },
     "localname": "LossContingenciesByNatureOfContingencyAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossContingenciesLineItems": {
     "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": "Loss Contingencies [Line Items]",
        "terseLabel": "Loss Contingencies [Line Items]"
       }
      }
     },
     "localname": "LossContingenciesLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossContingenciesTable": {
     "auth_ref": [
      "r215",
      "r216",
      "r217",
      "r218",
      "r219",
      "r220",
      "r221",
      "r225",
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Discloses the specific components (such as the nature, name, and date) of the loss contingency and gives an estimate of the possible loss or range of loss, or states that a reasonable estimate cannot be made. Excludes environmental contingencies, warranties and unconditional purchase obligations.",
        "label": "Loss Contingencies [Table]",
        "terseLabel": "Loss Contingencies [Table]"
       }
      }
     },
     "localname": "LossContingenciesTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossContingencyNatureDomain": {
     "auth_ref": [
      "r215",
      "r216",
      "r217",
      "r218",
      "r219",
      "r220",
      "r221",
      "r225",
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "An existing condition, situation, or set of circumstances involving uncertainty as to possible loss to an enterprise that will ultimately be resolved when one or more future events occur or fail to occur. Resolution of the uncertainty may confirm the incurrence of a loss or impairment of an asset or the incurrence of a liability.",
        "label": "Loss Contingency, Nature [Domain]",
        "terseLabel": "Loss Contingency, Nature [Domain]"
       }
      }
     },
     "localname": "LossContingencyNatureDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_MandatorilyRedeemableCapitalStockTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of mandatorily redeemable capital stock.",
        "label": "Mandatorily Redeemable Capital Stock [Table Text Block]",
        "terseLabel": "Schedule of Mandatorily Redeemable Capital Stock by Maturity Date"
       }
      }
     },
     "localname": "MandatorilyRedeemableCapitalStockTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_MortgageBackedSecuritiesIssuedByPrivateEnterprisesMember": {
     "auth_ref": [
      "r151",
      "r255"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debt securities collateralized by real estate mortgage loans (mortgages), issued by non-governmental sponsored enterprises.",
        "label": "Mortgage-backed Securities, Issued by Private Enterprises [Member]",
        "terseLabel": "Subtotal PLRMBS",
        "verboseLabel": "PLRMBS"
       }
      }
     },
     "localname": "MortgageBackedSecuritiesIssuedByPrivateEnterprisesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember": {
     "auth_ref": [
      "r255"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debt securities collateralized by real estate mortgage loans (mortgages), issued by US Government Sponsored Enterprises, such as Federal Home Loan Mortgage Corporation (FHLMC or Freddie Mac).",
        "label": "Mortgage-backed Securities, Issued by US Government Sponsored Enterprises [Member]",
        "terseLabel": "MBS - GSEs",
        "verboseLabel": "MBS \u2013 Other U.S. obligations \u2013 Ginnie Mae"
       }
      }
     },
     "localname": "MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails",
      "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_MortgageBackedSecuritiesMember": {
     "auth_ref": [
      "r151",
      "r255",
      "r256",
      "r259",
      "r435"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Securities collateralized by mortgage loans.",
        "label": "Collateralized Mortgage Backed Securities [Member]",
        "terseLabel": "Collateralized Mortgage Backed Securities [Member]",
        "verboseLabel": "Total MBS"
       }
      }
     },
     "localname": "MortgageBackedSecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_MortgageLoansInProcessOfForeclosureAmount": {
     "auth_ref": [
      "r132"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Recorded investment of consumer mortgage loan receivables secured by residential real estate properties for which formal foreclosure proceedings are in process.",
        "label": "Mortgage Loans in Process of Foreclosure, Amount",
        "verboseLabel": "In process of foreclosure, included above"
       }
      }
     },
     "localname": "MortgageLoansInProcessOfForeclosureAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_MortgagesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A loan to finance the purchase of real estate where the lender has a lien on the property as collateral for the loan.",
        "label": "Mortgages [Member]",
        "terseLabel": "Mortgages",
        "verboseLabel": "Mortgages"
       }
      }
     },
     "localname": "MortgagesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails",
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivities": {
     "auth_ref": [
      "r76"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect",
       "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/(used in) financing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Financing Activities [Abstract]",
        "terseLabel": "Net Cash Provided by (Used in) Financing Activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivities": {
     "auth_ref": [
      "r76"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect",
       "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Investing Activities [Abstract]",
        "terseLabel": "Net Cash Provided by (Used in) Investing Activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivities": {
     "auth_ref": [
      "r76",
      "r78",
      "r82"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect",
       "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 provided by/(used in) operating activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Operating Activities [Abstract]",
        "terseLabel": "Net Cash Provided by (Used in) Operating Activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetIncomeLossAttributableToParentNetOfFederalHomeLoanBankAssessments": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_ComprehensiveIncomeLossNetOfFederalHomeLoanBankAssessmentsAttributableToParent",
       "weight": 1.0
      },
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of profit (loss) after Federal Home Loan Bank (FHLBank) assessments attributable to the parent.",
        "label": "Net Income (Loss) Attributable to Parent, Net of Federal Home Loan Bank Assessments",
        "terseLabel": "Net Income/(Loss)",
        "totalLabel": "Net Income/(Loss)"
       }
      }
     },
     "localname": "NetIncomeLossAttributableToParentNetOfFederalHomeLoanBankAssessments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCashFlows",
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetSharesReclassifiedToMandatorilyRedeemableCapitalStockShares": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Net number of shares reclassified to mandatorily redeemable capital stock.",
        "label": "Net Shares Reclassified to Mandatorily Redeemable Capital Stock, Shares",
        "negatedTerseLabel": "Net Shares Reclassified from/(to) Mandatorily Redeemable Capital Stock, Shares"
       }
      }
     },
     "localname": "NetSharesReclassifiedToMandatorilyRedeemableCapitalStockShares",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_NetSharesReclassifiedToMandatorilyRedeemableCapitalStockValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Value of net shares reclassified to mandatorily redeemable capital stock.",
        "label": "Net Shares Reclassified to Mandatorily Redeemable Capital Stock, Value",
        "negatedTerseLabel": "Capital stock reclassified from/(to) mandatorily redeemable capital stock, net, value",
        "terseLabel": "Transfers of capital stock to mandatorily redeemable capital stock",
        "verboseLabel": "Reclassified from/(to) capital during the period"
       }
      }
     },
     "localname": "NetSharesReclassifiedToMandatorilyRedeemableCapitalStockValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NewAccountingPronouncementsAndChangesInAccountingPrinciplesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "New Accounting Pronouncements and Changes in Accounting Principles [Abstract]"
       }
      }
     },
     "localname": "NewAccountingPronouncementsAndChangesInAccountingPrinciplesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_NewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock": {
     "auth_ref": [
      "r103"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure of changes in accounting principles, including adoption of new accounting pronouncements, that describes the new methods, amount and effects on financial statement line items.",
        "label": "New Accounting Pronouncements and Changes in Accounting Principles [Text Block]",
        "terseLabel": "Recently Issued and Adopted Accounting Guidance"
       }
      }
     },
     "localname": "NewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/RecentlyIssuedAndAdoptedAccountingGuidance"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy pertaining to new accounting pronouncements that may impact the entity's financial reporting. Includes, but is not limited to, quantification of the expected or actual impact.",
        "label": "New Accounting Pronouncements, Policy [Policy Text Block]",
        "terseLabel": "New Accounting Pronouncements, Policy"
       }
      }
     },
     "localname": "NewAccountingPronouncementsPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_NondesignatedMember": {
     "auth_ref": [
      "r273"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Derivative instrument not designated as hedging instrument under Generally Accepted Accounting Principles (GAAP).",
        "label": "Not Designated as Hedging Instrument [Member]",
        "terseLabel": "Not Designated as Hedging Instrument [Member]",
        "verboseLabel": "Not Designated as Hedging Instrument"
       }
      }
     },
     "localname": "NondesignatedMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_NoninterestBearingDepositLiabilitiesDomestic": {
     "auth_ref": [
      "r383"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of domestic noninterest-bearing deposits held by the entity, which may include demand deposits, checking, brokered and retail deposits.",
        "label": "Noninterest-bearing Deposit Liabilities, Domestic",
        "terseLabel": "Noninterest-bearing Deposits"
       }
      }
     },
     "localname": "NoninterestBearingDepositLiabilitiesDomestic",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NoninterestExpense": {
     "auth_ref": [
      "r401"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/SegmentInformationDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments",
       "weight": -1.0
      },
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total aggregate amount of all noninterest expense.",
        "label": "Noninterest Expense",
        "terseLabel": "Other Expense",
        "totalLabel": "Total Other Expense"
       }
      }
     },
     "localname": "NoninterestExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NoninterestExpenseAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Noninterest Expense [Abstract]",
        "terseLabel": "Other Expense:"
       }
      }
     },
     "localname": "NoninterestExpenseAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NoninterestIncome": {
     "auth_ref": [
      "r400"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/SegmentInformationDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments",
       "weight": 1.0
      },
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The total amount of noninterest income which may be derived from: (1) fees and commissions; (2) premiums earned; (3) insurance policy charges; (4) the sale or disposal of assets; and (5) other sources not otherwise specified.",
        "label": "Noninterest Income",
        "terseLabel": "Other Income/ (Loss)",
        "totalLabel": "Total Other Income/(Loss)"
       }
      }
     },
     "localname": "NoninterestIncome",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NoninterestIncomeAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Noninterest Income [Abstract]",
        "terseLabel": "Other Income/(Loss):"
       }
      }
     },
     "localname": "NoninterestIncomeAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NoninterestIncomeOtherOperatingIncome": {
     "auth_ref": [
      "r57",
      "r394",
      "r432"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 3.0,
       "parentTag": "us-gaap_NoninterestIncome",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of revenue earned, classified as other, excluding interest income.",
        "label": "Noninterest Income, Other Operating Income",
        "terseLabel": "Other, net"
       }
      }
     },
     "localname": "NoninterestIncomeOtherOperatingIncome",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NonperformingFinancingReceivableMember": {
     "auth_ref": [
      "r130",
      "r191"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Category status of financial instruments in which payments are past due in accordance with the terms of the contract. Financial instruments include, but are not limited to, financing receivables, loans, debt, and investments.",
        "label": "Nonperforming Financial Instruments [Member]",
        "verboseLabel": "Nonperforming"
       }
      }
     },
     "localname": "NonperformingFinancingReceivableMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_NotDesignatedAsHedgingInstrumentEconomicHedgeMember": {
     "auth_ref": [
      "r272"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Derivative instrument, not designated as hedging instrument under Generally Accepted Accounting Principles (GAAP), used as economic hedge for exposure to risk.",
        "label": "Not Designated as Hedging Instrument, Economic Hedge [Member]",
        "terseLabel": "Not Designated as Hedging Instrument, Economic Hedge [Member]",
        "verboseLabel": "Not Designated as Hedging Instrument, Economic Hedge"
       }
      }
     },
     "localname": "NotDesignatedAsHedgingInstrumentEconomicHedgeMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfConditionDetails",
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesDerivativesInStatementOfIncomeAndImpactOnInterestDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_NotesReceivableGross": {
     "auth_ref": [
      "r190"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, before allowance for credit loss, of financing receivable.",
        "label": "Financing Receivable, before Allowance for Credit Loss",
        "verboseLabel": "Total MPF Recorded Investment"
       }
      }
     },
     "localname": "NotesReceivableGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NumberOfOperatingSegments": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of operating segments. An operating segment is a component of an enterprise: (a) that engages in business activities from which it may earn revenues and incur expenses (including revenues and expenses relating to transactions with other components of the same enterprise), (b) whose operating results are regularly reviewed by the enterprise's chief operating decision maker to make decisions about resources to be allocated to the segment and assess its performance, and (c) for which discrete financial information is available. An operating segment may engage in business activities for which it has yet to earn revenues, for example, start-up operations may be operating segments before earning revenues.",
        "label": "Number of Operating Segments",
        "terseLabel": "Number of Operating Segments"
       }
      }
     },
     "localname": "NumberOfOperatingSegments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_ObligationWithJointAndSeveralLiabilityArrangementAmountOutstanding": {
     "auth_ref": [
      "r211"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount outstanding, before the effects of recovery, of obligation under the joint and several liability arrangement.",
        "label": "Obligation with Joint and Several Liability Arrangement, Amount Outstanding",
        "terseLabel": "Obligation with Joint and Several Liability Arrangement, Amount Outstanding"
       }
      }
     },
     "localname": "ObligationWithJointAndSeveralLiabilityArrangementAmountOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OfficeOfFinanceAssessmentsCostAssessedOnFederalHomeLoanBank": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 4.0,
       "parentTag": "us-gaap_NoninterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of a Federal Home Loan Bank's (FHLBank) proportionate share of the costs of operating the Office of Finance.",
        "label": "Office of Finance, Cost Assessed on Federal Home Loan Bank",
        "terseLabel": "Office of Finance"
       }
      }
     },
     "localname": "OfficeOfFinanceAssessmentsCostAssessedOnFederalHomeLoanBank",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OffsettingAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Offsetting [Abstract]"
       }
      }
     },
     "localname": "OffsettingAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_OffsettingAssetsTableTextBlock": {
     "auth_ref": [
      "r35",
      "r36"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of derivative and other financial assets that are subject to offsetting, including master netting arrangements.",
        "label": "Offsetting Assets [Table Text Block]",
        "terseLabel": "Schedule of Derivative Instruments, Offsetting Derivative Assets"
       }
      }
     },
     "localname": "OffsettingAssetsTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_OffsettingLiabilitiesTableTextBlock": {
     "auth_ref": [
      "r35",
      "r36"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of derivative and other financial liabilities that are subject to offsetting, including master netting arrangements.",
        "label": "Offsetting Liabilities [Table Text Block]",
        "terseLabel": "Schedule of Derivative Instruments, Offsetting Derivative Liabilities"
       }
      }
     },
     "localname": "OffsettingLiabilitiesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_OtherAssets": {
     "auth_ref": [
      "r3",
      "r375",
      "r424"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 11.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of assets classified as other.",
        "label": "Other Assets",
        "terseLabel": "Other assets"
       }
      }
     },
     "localname": "OtherAssets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherAssetsFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of other assets.",
        "label": "Other Assets, Fair Value Disclosure",
        "terseLabel": "Other assets"
       }
      }
     },
     "localname": "OtherAssetsFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent": {
     "auth_ref": [
      "r261",
      "r262",
      "r263"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_OtherComprehensiveIncomeLossBeforeTaxPortionAttributableToParent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before tax, after reclassification adjustments, of appreciation (loss) in value of unsold available-for-sale securities, attributable to parent entity. Excludes amounts related to other than temporary impairment (OTTI) loss.",
        "label": "Other Comprehensive Income (Loss), Available-for-sale Securities Adjustment, before Tax, Portion Attributable to Parent",
        "terseLabel": "Unrealized gain/(loss) on AFS securities"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeAvailableforsaleSecuritiesAdjustmentBeforeTaxPortionAttributableToParent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPortionAttributableToParent": {
     "auth_ref": [
      "r261",
      "r262",
      "r263"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_OtherComprehensiveIncomeLossBeforeTaxPortionAttributableToParent",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, before tax, after reclassification adjustment, of (increase) decrease in accumulated other comprehensive (income) loss for defined benefit plan, attributable to parent entity.",
        "label": "Other Comprehensive (Income) Loss, Defined Benefit Plan, before Tax, after Reclassification Adjustment, Attributable to Parent",
        "negatedTerseLabel": "Net change in pension and postretirement benefits"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPortionAttributableToParent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossBeforeTaxPortionAttributableToParent": {
     "auth_ref": [
      "r261",
      "r262",
      "r263"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_ComprehensiveIncomeLossNetOfFederalHomeLoanBankAssessmentsAttributableToParent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before tax of other comprehensive income (loss) attributable to parent entity.",
        "label": "Other Comprehensive Income (Loss), before Tax, Portion Attributable to Parent",
        "totalLabel": "Total other comprehensive income/(loss)"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossBeforeTaxPortionAttributableToParent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossBeforeTaxPortionAttributableToParentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Other Comprehensive Income (Loss), before Tax, Portion Attributable to Parent [Abstract]",
        "terseLabel": "Other Comprehensive Income/(Loss):"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossBeforeTaxPortionAttributableToParentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodChangeAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Other Comprehensive Income (Loss) Net of Tax, Period Change [Abstract]",
        "terseLabel": "Reclassification from other comprehensive income/(loss) to net income/(loss) [Abstract]"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossNetOfTaxPeriodChangeAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent": {
     "auth_ref": [
      "r55",
      "r56",
      "r261",
      "r262",
      "r263"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after tax of other comprehensive income (loss) attributable to parent entity.",
        "label": "Other Comprehensive Income (Loss), Net of Tax, Portion Attributable to Parent",
        "terseLabel": "Other Comprehensive Income (Loss), Net of Tax, Portion Attributable to Parent"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesBeforeTax": {
     "auth_ref": [
      "r49",
      "r51",
      "r53",
      "r176"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before tax of reclassification adjustment from accumulated other comprehensive income for unrealized gain (loss) realized upon the sale of available-for-sale securities.",
        "label": "Other Comprehensive Income (Loss), Reclassification Adjustment from AOCI for Sale of Securities, before Tax",
        "terseLabel": "Other Comprehensive Income (Loss), Reclassification Adjustment from AOCI for Sale of Securities, before Tax"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeReclassificationAdjustmentForHeldToMaturityTransferredToAvailableForSaleSecuritiesBeforeTax": {
     "auth_ref": [
      "r49",
      "r51",
      "r52",
      "r144",
      "r145"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before tax and reclassification adjustments of unrealized holding gain (loss) related to transfers of securities into the available-for-sale classification and out of the held-to-maturity classification.",
        "label": "Other Comprehensive Income (Loss), Transfers from Held-to-maturity to Available-for-Sale Securities, before Tax",
        "terseLabel": "Non-credit-related OTTI loss transferred to AFS securities"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeReclassificationAdjustmentForHeldToMaturityTransferredToAvailableForSaleSecuritiesBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodBeforeTax": {
     "auth_ref": [
      "r43",
      "r49",
      "r176"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before tax and reclassification adjustments of unrealized holding gain (loss) on available-for-sale securities.",
        "label": "Other Comprehensive Income (Loss), Securities, Available-for-Sale, Unrealized Holding Gain (Loss) Arising During Period, before Tax",
        "terseLabel": "AFS Unrealized Gain/(Loss) on AFS Securities"
       }
      }
     },
     "localname": "OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherComprehensiveLossHeldToMaturitySecurityAdjustmentFromAociForAccretionOfNoncreditPortionOfOttiBeforeTax": {
     "auth_ref": [
      "r50",
      "r146"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, before tax, of adjustment from accumulated other comprehensive loss for accretion of other than temporary impairment (OTTI) on investment in held-to-maturity security.",
        "label": "Other Comprehensive Loss, Held-to-maturity Security, Adjustment from AOCI for Accretion of Noncredit Portion of OTTI, before Tax",
        "terseLabel": "Accretion of non-credit-related OTTI loss"
       }
      }
     },
     "localname": "OtherComprehensiveLossHeldToMaturitySecurityAdjustmentFromAociForAccretionOfNoncreditPortionOfOttiBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfComprehensiveIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherCostAndExpenseOperating": {
     "auth_ref": [
      "r60"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_NoninterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The total amount of other operating cost and expense items that are associated with the entity's normal revenue producing operation.",
        "label": "Other Cost and Expense, Operating",
        "terseLabel": "Other operating expense"
       }
      }
     },
     "localname": "OtherCostAndExpenseOperating",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherLiabilities": {
     "auth_ref": [
      "r386"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 7.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of liabilities classified as other.",
        "label": "Other Liabilities",
        "terseLabel": "Other liabilities",
        "verboseLabel": "Other Liabilities"
       }
      }
     },
     "localname": "OtherLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNoncashIncomeExpense": {
     "auth_ref": [
      "r82"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 10.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "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)",
        "negatedTerseLabel": "Other Adjustments"
       }
      }
     },
     "localname": "OtherNoncashIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNoninterestExpense": {
     "auth_ref": [
      "r401"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 6.0,
       "parentTag": "us-gaap_NoninterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of noninterest expense classified as other.",
        "label": "Other Noninterest Expense",
        "verboseLabel": "Other, net"
       }
      }
     },
     "localname": "OtherNoninterestExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsAdditionsAdditionalCreditLosses": {
     "auth_ref": [
      "r171"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents an increase to the cumulative amount of credit losses recognized in earnings for an other than temporary impairment (OTTI) of a debt security held for which a previous OTTI was recognized and the investor does not intend to sell the debt security and it is not more likely than not that the investor will be required to sell the debt security before recovery of its amortized cost basis.",
        "label": "Other than Temporary Impairment, Credit Losses Recognized in Earnings, Additions, Additional Credit Losses",
        "negatedTerseLabel": "Other income, net",
        "terseLabel": "Additional charges on securities for which OTTI was previously recognized"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsAdditionsAdditionalCreditLosses",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details",
      "http://www.fhlbsf.com/role/InvestmentsOttiRollforwardDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCategoriesOfInvestmentsDomain": {
     "auth_ref": [
      "r169"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Provides the categories of debt securities, available-for-sale or held-to-maturity, on which an entity may recognize other than temporary impairments (OTTI) for which a portion related to credit losses has been recognized in earnings and a portion related to all other factors has been recognized in other comprehensive income.",
        "label": "Other than Temporary Impairment, Credit Losses Recognized in Earnings, Categories of Investments [Domain]",
        "terseLabel": "Other than Temporary Impairment, Credit Losses Recognized in Earnings, Categories of Investments [Domain]"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCategoriesOfInvestmentsDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeld": {
     "auth_ref": [
      "r170",
      "r173"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cumulative amount of credit losses recognized in earnings related to debt securities held for which a portion of an other than temporary impairment (OTTI) was recognized in other comprehensive income (a component of shareholders' equity).",
        "label": "Other than Temporary Impairment, Credit Losses Recognized in Earnings, Credit Losses on Debt Securities Held",
        "terseLabel": "Credit-related OTTI"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsCreditLossesOnDebtSecuritiesHeld",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsOttiRollforwardDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsReductionsCashFlows": {
     "auth_ref": [
      "r172"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents reductions in the cumulative amount of credit losses recognized in earnings for an other than temporary impairment (OTTI) of a debt security held due to increases in cash flows expected to be collected and recognized over the remaining life of the security.",
        "label": "Other than Temporary Impairment, Credit Losses Recognized in Earnings, Reductions, Cash Flows",
        "negatedTerseLabel": "Accretion of yield adjustments resulting from improvement of expected cash flows that are recognized over the remaining life of the securities"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsReductionsCashFlows",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsOttiRollforwardDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsTableTextBlock": {
     "auth_ref": [
      "r169"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the amount of other than temporary impairment (OTTI) related to credit losses recognized in earnings including: (a) the beginning balance of the amount related to credit losses on debt securities held by the investor at the beginning of the period for which a portion of an OTTI was recognized in other comprehensive income; (b) additions for the amount related to the credit loss for which an OTTI was not previously recognized; (c) reductions for securities sold during the period (realized); (d) reductions for securities for which the amount previously recognized in other comprehensive income was recognized in earnings because the investor intends to sell the security or more likely than not will be required to sell the security before recovery of its amortized cost basis; (e) additional increases to the amount related to the credit loss for which an OTTI was previously recognized when the investor does not intend to sell the security and it is not more likely than not that the investor will be required to sell the security before recovery of its amortized cost basis; (f) reductions for increases in cash flows expected to be collected that are recognized over the remaining life of the security; and (g) the ending balance of the amount related to credit losses on debt securities held by the entity at the end of the period for which a portion of an OTTI was recognized in other comprehensive income.",
        "label": "Other than Temporary Impairment, Credit Losses Recognized in Earnings [Table Text Block]",
        "terseLabel": "Other than Temporary Impairment, Credit Losses Recognized in Earnings"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentCreditLossesRecognizedInEarningsTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_OtherThanTemporaryImpairmentLossesInvestmentsAccretionOfNoncreditPortionHeldtomaturitySecuritiesBeforeTax": {
     "auth_ref": [
      "r146"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, before tax, of accretion of other-than-temporary impairment (OTTI) related to factors other than credit loss on investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Other-than-temporary Impairment Loss, Debt Securities, Held-to-maturity, Accretion of Noncredit Portion, before Tax",
        "negatedTerseLabel": "Accretion of Noncredit Related OTTI Loss"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentLossesInvestmentsAccretionOfNoncreditPortionHeldtomaturitySecuritiesBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherThanTemporaryImpairmentLossesInvestmentsPortionRecognizedInEarningsNet": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of other than temporary impairment (OTTI) losses on equity securities, OTTI related to credit losses on debt securities, and OTTI losses on debt securities when the entity intends to sell the securities or it is more likely than not that the entity will be required to sell the securities before recovery of its amortized cost basis. Additionally, this item includes OTTI losses recognized during the period on investments accounted for under the cost method of accounting.",
        "label": "Other than Temporary Impairment Losses, Investments, Portion Recognized in Earnings, Net",
        "terseLabel": "Net OTTI loss, credit-related"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentLossesInvestmentsPortionRecognizedInEarningsNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherThanTemporaryImpairmentLossesInvestmentsReclassificationAdjustmentOfNoncreditPortionIncludedInNetIncomeAvailabeforsaleSecuritiesBeforeTax": {
     "auth_ref": [
      "r150"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before tax of reclassification adjustment for other than temporary impairment (OTTI) related to factors other than credit loss on a previously impaired investment in available-for-sale debt security.",
        "label": "Other than Temporary Impairment Losses, Investments, Reclassification Adjustment of Noncredit Portion Included in Net Income, Availabe-for-sale Securities, before Tax",
        "terseLabel": "Non-credit-related OTTI to credit-related OTTI, AFS"
       }
      }
     },
     "localname": "OtherThanTemporaryImpairmentLossesInvestmentsReclassificationAdjustmentOfNoncreditPortionIncludedInNetIncomeAvailabeforsaleSecuritiesBeforeTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OverTheCounterMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Transaction that does not take place on an organized exchange.",
        "label": "Over the Counter [Member]",
        "terseLabel": "Uncleared derivatives"
       }
      }
     },
     "localname": "OverTheCounterMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PastDueFinancingReceivablesTableTextBlock": {
     "auth_ref": [
      "r137",
      "r138",
      "r183",
      "r199"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of aging analysis for financing receivable.",
        "label": "Financing Receivable, Past Due [Table Text Block]",
        "terseLabel": "Other Delinquency Statistics"
       }
      }
     },
     "localname": "PastDueFinancingReceivablesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_PaymentsForAffordableHousingPrograms": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow for payments made by the Federal Home Loan Banks (FHLBanks) to the Affordable Housing Program (AHP).",
        "label": "Payments for Affordable Housing Programs",
        "terseLabel": "AHP payments"
       }
      }
     },
     "localname": "PaymentsForAffordableHousingPrograms",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForFederalHomeLoanBankAdvances": {
     "auth_ref": [
      "r65"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 10.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow for disbursement to borrower related to advance, made by Federal Home Loan Bank (FHLBank), classified as investing activity.",
        "label": "Payments for FHLBank Advance, Investing Activities",
        "negatedLabel": "Originated"
       }
      }
     },
     "localname": "PaymentsForFederalHomeLoanBankAdvances",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForProceedsFromHedgeFinancingActivities": {
     "auth_ref": [
      "r99"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 11.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net cash outflow or inflow for a financial contract that meets the hedge criteria as either cash flow hedge, fair value hedge or hedge of net investment in foreign operations.",
        "label": "Payments for (Proceeds from) Hedge, Financing Activities",
        "negatedTerseLabel": "Payments for (Proceeds from) Hedge, Financing Activities"
       }
      }
     },
     "localname": "PaymentsForProceedsFromHedgeFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForProceedsFromLoansAndLeasesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Payments for (Proceeds from) Loans and Leases [Abstract]",
        "terseLabel": "Mortgage loans held for portfolio:"
       }
      }
     },
     "localname": "PaymentsForProceedsFromLoansAndLeasesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PaymentsForProceedsFromOtherInvestingActivities": {
     "auth_ref": [
      "r64",
      "r67",
      "r99"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 14.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",
        "negatedTerseLabel": "Other Investing Activities"
       }
      }
     },
     "localname": "PaymentsForProceedsFromOtherInvestingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForRepurchaseOfCommonStock": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow to reacquire common stock during the period.",
        "label": "Payments for Repurchase of Common Stock",
        "negatedLabel": "Payments for repurchase of capital stock"
       }
      }
     },
     "localname": "PaymentsForRepurchaseOfCommonStock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsOfDividends": {
     "auth_ref": [
      "r71"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cash outflow in the form of capital distributions and dividends to common shareholders, preferred shareholders and noncontrolling interests.",
        "label": "Payments of Dividends",
        "terseLabel": "Total dividends"
       }
      }
     },
     "localname": "PaymentsOfDividends",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsOfDividendsCommonStock": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 9.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow in the form of ordinary dividends to common shareholders of the parent entity.",
        "label": "Payments of Ordinary Dividends, Common Stock",
        "negatedTerseLabel": "Cash dividends paid"
       }
      }
     },
     "localname": "PaymentsOfDividendsCommonStock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireAvailableForSaleSecurities": {
     "auth_ref": [
      "r66",
      "r149"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 13.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow to acquire debt and equity securities not classified as either held-to-maturity securities or trading securities which would be classified as available-for-sale securities and reported at fair value, with unrealized gains and losses excluded from earnings and reported in a separate component of shareholders' equity.",
        "label": "Payments to Acquire Available-for-sale Securities",
        "negatedTerseLabel": "Purchases"
       }
      }
     },
     "localname": "PaymentsToAcquireAvailableForSaleSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireHeldToMaturitySecurities": {
     "auth_ref": [
      "r65",
      "r149"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow through purchase of long-term held-to-maturity securities.",
        "label": "Payments to Acquire Held-to-maturity Securities",
        "negatedTerseLabel": "Purchases"
       }
      }
     },
     "localname": "PaymentsToAcquireHeldToMaturitySecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireInvestmentsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Payments to Acquire Investments [Abstract]",
        "terseLabel": "Trading securities:"
       }
      }
     },
     "localname": "PaymentsToAcquireInvestmentsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PaymentsToAcquireLoansHeldForInvestment": {
     "auth_ref": [
      "r65"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 12.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow associated with purchasing loans held for investment purposes during the period.",
        "label": "Payments to Acquire Loans Held-for-investment",
        "negatedTerseLabel": "Purchases"
       }
      }
     },
     "localname": "PaymentsToAcquireLoansHeldForInvestment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireOtherReceivables": {
     "auth_ref": [
      "r67"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow from the purchase of receivables classified as other.",
        "label": "Payments to Acquire Other Receivables",
        "negatedLabel": "Payments to Extend Overnight Loans to Other FHLBanks"
       }
      }
     },
     "localname": "PaymentsToAcquireOtherReceivables",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireTradingSecuritiesHeldforinvestment": {
     "auth_ref": [
      "r67"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow to acquire securities classified as trading securities and held for investment purposes. Excludes payments for trading securities purchased and held principally for the purpose of selling them in the near term (thus held for only a short period of time).",
        "label": "Payments to Acquire Trading Securities Held-for-investment",
        "negatedTerseLabel": "Purchases of long-term"
       }
      }
     },
     "localname": "PaymentsToAcquireTradingSecuritiesHeldforinvestment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PerformingFinancingReceivableMember": {
     "auth_ref": [
      "r130",
      "r191"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Category status of financial instruments in which payments are received or paid on a timely basis in accordance with the terms of the contract. Financial instruments include, but are not limited to, financing receivables, loans, debt instruments, and investments.",
        "label": "Performing Financial Instruments [Member]",
        "terseLabel": "Current Performing Loan"
       }
      }
     },
     "localname": "PerformingFinancingReceivableMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PortionAtFairValueFairValueDisclosureMember": {
     "auth_ref": [
      "r324"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Measured at fair value for financial reporting purposes.",
        "label": "Portion at Fair Value Measurement [Member]",
        "terseLabel": "Portion at Fair Value Measurement"
       }
      }
     },
     "localname": "PortionAtFairValueFairValueDisclosureMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PrimeMember": {
     "auth_ref": [
      "r191"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Credit rating classification of borrowers with strong credit histories and who have a low risk of default and qualify for the prime rate.",
        "label": "Prime [Member]",
        "verboseLabel": "Prime"
       }
      }
     },
     "localname": "PrimeMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ProceedsFromCollectionOfOtherReceivables": {
     "auth_ref": [
      "r64"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from the collection of receivables classified as other.",
        "label": "Proceeds from Collection of Other Receivables",
        "terseLabel": "MPF Counterparty fee Income"
       }
      }
     },
     "localname": "ProceedsFromCollectionOfOtherReceivables",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromFederalHomeLoanBankAdvances": {
     "auth_ref": [
      "r63"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 9.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from collection of advance by Federal Home Loan Bank (FHLBank), classified as investing activity.",
        "label": "Proceeds from FHLBank Advance, Investing Activities",
        "terseLabel": "Repaid"
       }
      }
     },
     "localname": "ProceedsFromFederalHomeLoanBankAdvances",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromFederalHomeLoanBankBorrowings": {
     "auth_ref": [
      "r69"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from Federal Home Loan Bank (FHLBank) borrowing, classified as financing activity.",
        "label": "Proceeds from FHLBank Borrowings, Financing Activities",
        "terseLabel": "Proceeds from Other FHLBank Borrowings"
       }
      }
     },
     "localname": "ProceedsFromFederalHomeLoanBankBorrowings",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromIssuanceOfCommonStock": {
     "auth_ref": [
      "r68"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow from the additional capital contribution to the entity.",
        "label": "Proceeds from Issuance of Common Stock",
        "terseLabel": "Proceeds from issuance of capital stock"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfCommonStock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromIssuanceOfLongTermDebtAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Proceeds from Issuance of Long-term Debt [Abstract]",
        "terseLabel": "Net proceeds from issuance of consolidated obligations:"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfLongTermDebtAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ProceedsFromIssuanceOfOtherLongTermDebt": {
     "auth_ref": [
      "r69"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from issuance of long-term debt classified as other.",
        "label": "Proceeds from Issuance of Other Long-term Debt",
        "terseLabel": "Bonds"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfOtherLongTermDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromOtherShortTermDebt": {
     "auth_ref": [
      "r69"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from short-term debt classified as other.",
        "label": "Proceeds from Other Short-term Debt",
        "verboseLabel": "Discount notes"
       }
      }
     },
     "localname": "ProceedsFromOtherShortTermDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromPaymentsForInInterestBearingDepositsInBanks": {
     "auth_ref": [
      "r85",
      "r408"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net cash inflow or outflow in Interest-bearing Deposits by banks in other financial institutions for relatively short periods of time including, for example, certificates of deposits.",
        "label": "Proceeds from (Payments for) in Interest-bearing Deposits in Banks",
        "terseLabel": "Interest-bearing deposits"
       }
      }
     },
     "localname": "ProceedsFromPaymentsForInInterestBearingDepositsInBanks",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromPaymentsForOtherFinancingActivities": {
     "auth_ref": [
      "r70",
      "r73",
      "r99"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 10.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": "Net change in deposits and other financing activities"
       }
      }
     },
     "localname": "ProceedsFromPaymentsForOtherFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromPaymentsForSecuritiesPurchasedUnderAgreementsToResell": {
     "auth_ref": [
      "r84",
      "r85"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net cash flow from purchases followed by sales of securities under terms of reverse repurchase agreements.",
        "label": "Proceeds from (Payments for) Securities Purchased under Agreements to Resell",
        "terseLabel": "Securities purchased under agreements to resell"
       }
      }
     },
     "localname": "ProceedsFromPaymentsForSecuritiesPurchasedUnderAgreementsToResell",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment": {
     "auth_ref": [
      "r63"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 11.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow from repayments of the balance excluding interest (principal) on loans receivable and leases held for investment purposes.",
        "label": "Proceeds from Principal Repayments on Loans and Leases Held-for-investment",
        "terseLabel": "Principal collected"
       }
      }
     },
     "localname": "ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities": {
     "auth_ref": [
      "r62",
      "r63",
      "r149"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from sale, 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 Sale and Maturity of Debt Securities, Available-for-sale",
        "terseLabel": "Proceeds"
       }
      }
     },
     "localname": "ProceedsFromSaleAndMaturityOfAvailableForSaleSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleAndMaturityOfHeldToMaturitySecurities": {
     "auth_ref": [
      "r63",
      "r149"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from the sale or maturity of long-term held-to-maturity securities.",
        "label": "Proceeds from Sale and Maturity of Held-to-maturity Securities",
        "terseLabel": "Proceeds"
       }
      }
     },
     "localname": "ProceedsFromSaleAndMaturityOfHeldToMaturitySecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleAndMaturityOfHeldToMaturitySecuritiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Proceeds from Sale and Maturity of Held-to-maturity Securities [Abstract]",
        "terseLabel": "HTM securities:"
       }
      }
     },
     "localname": "ProceedsFromSaleAndMaturityOfHeldToMaturitySecuritiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ProceedsFromSaleAndMaturityOfTradingSecuritiesHeldforinvestment": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow associated with the sale, maturities, repayments and calls of securities classified as trading securities and held for investment purposes. Excludes proceeds from trading securities purchased and held principally for the purpose of selling them in the near term (thus held for only a short period of time).",
        "label": "Proceeds from Sale and Maturity of Debt and Equity Securities, FV-NI, Held-for-investment",
        "terseLabel": "Proceeds"
       }
      }
     },
     "localname": "ProceedsFromSaleAndMaturityOfTradingSecuritiesHeldforinvestment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProvisionForLoanLeaseAndOtherLosses": {
     "auth_ref": [
      "r80",
      "r128",
      "r398"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 2.0,
       "parentTag": "us-gaap_InterestIncomeExpenseAfterProvisionForLoanLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expense related loan transactions, lease transactions, credit loss from transactions other than loan and lease transactions, and other loss based on assessment of uncollectability from the counterparty to reduce the account to their net realizable value.",
        "label": "Provision for Loan, Lease, and Other Losses",
        "terseLabel": "Provision for Loan, Lease, and Other Losses",
        "verboseLabel": "Provision for/(reversal of) credit loss"
       }
      }
     },
     "localname": "ProvisionForLoanLeaseAndOtherLosses",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/SegmentInformationDetails",
      "http://www.fhlbsf.com/role/StatementsOfCashFlows",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProvisionForOtherCreditLosses": {
     "auth_ref": [
      "r80",
      "r393"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expense related to credit loss from transactions other than loan and lease transactions.",
        "label": "Provision for Other Credit Losses",
        "negatedTerseLabel": "Provision for Other Credit Losses"
       }
      }
     },
     "localname": "ProvisionForOtherCreditLosses",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueLevel3Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ReceivablesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Receivables [Abstract]"
       }
      }
     },
     "localname": "ReceivablesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_ReconciliationOfAssetsFromSegmentToConsolidatedTextBlock": {
     "auth_ref": [
      "r120",
      "r122"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of all significant reconciling items in the reconciliation of total assets from reportable segments to the entity's consolidated assets.",
        "label": "Reconciliation of Assets from Segment to Consolidated [Table Text Block]",
        "terseLabel": "Schedule of Segment Assets by Segment"
       }
      }
     },
     "localname": "ReconciliationOfAssetsFromSegmentToConsolidatedTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ReconciliationOfOperatingProfitLossFromSegmentsToConsolidatedTextBlock": {
     "auth_ref": [
      "r119",
      "r122"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the reconciliation of profit (loss) from reportable segments to the consolidated income (loss) before income tax expense (benefit) and discontinued operations. Includes, but is not limited to, reconciliation after income tax if income tax is allocated to the reportable segment.",
        "label": "Reconciliation of Operating Profit (Loss) from Segments to Consolidated [Table Text Block]",
        "terseLabel": "Reconciliation of Operating Profit (Loss) from Segments to Consolidated"
       }
      }
     },
     "localname": "ReconciliationOfOperatingProfitLossFromSegmentsToConsolidatedTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RegulatorExpensesCostAssessedOnFederalHomeLoanBank": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 3.0,
       "parentTag": "us-gaap_NoninterestExpense",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of fees or assessments to fund the operations of the regulator of Federal Home Loan Banks (FHLBanks).",
        "label": "Regulator Expenses, Cost Assessed on Federal Home Loan Bank",
        "terseLabel": "Federal Housing Finance Agency"
       }
      }
     },
     "localname": "RegulatorExpensesCostAssessedOnFederalHomeLoanBank",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RelatedPartyDomain": {
     "auth_ref": [
      "r349"
     ],
     "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 [Domain]"
       }
      }
     },
     "localname": "RelatedPartyDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RelatedPartyTransactionAxis": {
     "auth_ref": [
      "r258",
      "r344",
      "r345"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of related party transaction.",
        "label": "Related Party Transaction [Axis]",
        "terseLabel": "Related Party Transaction [Axis]"
       }
      }
     },
     "localname": "RelatedPartyTransactionAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Transaction between related party.",
        "label": "Related Party Transaction [Domain]",
        "terseLabel": "Related Party Transaction [Domain]"
       }
      }
     },
     "localname": "RelatedPartyTransactionDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RelatedPartyTransactionLineItems": {
     "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": "Related Party Transaction [Line Items]",
        "terseLabel": "Related Party Transaction [Line Items]"
       }
      }
     },
     "localname": "RelatedPartyTransactionLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Related Party Transactions [Abstract]"
       }
      }
     },
     "localname": "RelatedPartyTransactionsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionsByRelatedPartyAxis": {
     "auth_ref": [
      "r258",
      "r344",
      "r345",
      "r360",
      "r361",
      "r362",
      "r363",
      "r364",
      "r365",
      "r366",
      "r367",
      "r368",
      "r369",
      "r370",
      "r371"
     ],
     "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 [Axis]"
       }
      }
     },
     "localname": "RelatedPartyTransactionsByRelatedPartyAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionsDisclosureTextBlock": {
     "auth_ref": [
      "r349"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for related party transactions. Examples of related party transactions include transactions between (a) a parent company and its subsidiary; (b) subsidiaries of a common parent; (c) and entity and its principal owners; and (d) affiliates.",
        "label": "Related Party Transactions Disclosure [Text Block]",
        "terseLabel": "Transactions with Certain Members, Certain Nonmembers, and Other FHLBanks"
       }
      }
     },
     "localname": "RelatedPartyTransactionsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanks"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RepaymentsOfLongTermDebtAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Repayments of Long-term Debt [Abstract]",
        "terseLabel": "Payments for matured and retired consolidated obligations:"
       }
      }
     },
     "localname": "RepaymentsOfLongTermDebtAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RepaymentsOfMandatoryRedeemableCapitalSecurities": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow related to equity securities that embody an unconditional obligation requiring the issuer to redeem the securities by transferring the assets at a specified or determinable date (or dates) that is (or are) initially more than one year (or the normal operating cycle, if longer) from the issuance date, or upon an event that is certain to occur beyond one year (or the normal operating cycle, if longer) from the issuance date.",
        "label": "Repayments of Mandatory Redeemable Capital Securities",
        "negatedTerseLabel": "Payments for repurchase/redemption of mandatorily redeemable capital stock"
       }
      }
     },
     "localname": "RepaymentsOfMandatoryRedeemableCapitalSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RepaymentsOfOtherLongTermDebt": {
     "auth_ref": [
      "r72"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow for the payment of debt classified as other, maturing after one year or the operating cycle, if longer.",
        "label": "Repayments of Other Long-term Debt",
        "negatedTerseLabel": "Bonds"
       }
      }
     },
     "localname": "RepaymentsOfOtherLongTermDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RepaymentsOfOtherShortTermDebt": {
     "auth_ref": [
      "r72"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow for the payment of debt classified as other, maturing within one year or the operating cycle, if longer.",
        "label": "Repayments of Other Short-term Debt",
        "negatedTerseLabel": "Discount notes"
       }
      }
     },
     "localname": "RepaymentsOfOtherShortTermDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ResidentialMortgageBackedSecuritiesMember": {
     "auth_ref": [
      "r151",
      "r255"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Securities collateralized by residential real estate mortgage loans.",
        "label": "Residential Mortgage Backed Securities [Member]",
        "terseLabel": "Residential Mortgage Backed Securities [Member]",
        "verboseLabel": "Residential Mortgage Backed Securities"
       }
      }
     },
     "localname": "ResidentialMortgageBackedSecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RetainedEarningsAccumulatedDeficit": {
     "auth_ref": [
      "r13",
      "r251",
      "r428"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 2.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)",
        "totalLabel": "Total Retained Earnings"
       }
      }
     },
     "localname": "RetainedEarningsAccumulatedDeficit",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsAppropriated": {
     "auth_ref": [
      "r27",
      "r240",
      "r241",
      "r423"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 2.0,
       "parentTag": "us-gaap_RetainedEarningsAccumulatedDeficit",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A segregation of retained earnings which is unavailable for dividend distribution. Includes also retained earnings appropriated for loss contingencies.",
        "label": "Retained Earnings, Appropriated",
        "periodEndLabel": "Balance at end of the period",
        "verboseLabel": "Restricted retained earnings"
       }
      }
     },
     "localname": "RetainedEarningsAppropriated",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsAppropriatedMember": {
     "auth_ref": [
      "r11",
      "r240"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A segregation of retained earnings which is unavailable for dividend distribution. Includes also retained earnings appropriated for loss contingencies.",
        "label": "Retained Earnings, Appropriated [Member]",
        "verboseLabel": "Total Restricted Retained Earnings"
       }
      }
     },
     "localname": "RetainedEarningsAppropriatedMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RetainedEarningsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings [Member]",
        "terseLabel": "Total Retained Earnings"
       }
      }
     },
     "localname": "RetainedEarningsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RetainedEarningsUnappropriated": {
     "auth_ref": [
      "r12",
      "r427"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 1.0,
       "parentTag": "us-gaap_RetainedEarningsAccumulatedDeficit",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A segregation of retained earnings which is available for dividend distribution. Earnings not paid out as dividends but instead reinvested in the core business or used to pay off debt. Unappropriated profit is part of shareholder equity. Also called cumulative distributions or earned surplus or accumulated earnings or unappropriated profit.",
        "label": "Retained Earnings, Unappropriated",
        "terseLabel": "Unrestricted retained earnings"
       }
      }
     },
     "localname": "RetainedEarningsUnappropriated",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsUnappropriatedMember": {
     "auth_ref": [
      "r12"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A segregation of retained earnings which is available for dividend distribution. Earnings not paid out as dividends but instead reinvested in the core business or used to pay off debt. Unappropriated profit is part of shareholder equity. Also called cumulative distributions or earned surplus or accumulated earnings or unappropriated profit.",
        "label": "Retained Earnings, Unappropriated [Member]",
        "terseLabel": "Unrestricted Retained Earnings"
       }
      }
     },
     "localname": "RetainedEarningsUnappropriatedMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock": {
     "auth_ref": [
      "r50"
     ],
     "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 Accumulated Other Comprehensive Income (Loss)"
       }
      }
     },
     "localname": "ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossTables"
     ],
     "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": "Debt Securities, Available-for-sale [Line Items]"
       }
      }
     },
     "localname": "ScheduleOfAvailableForSaleSecuritiesLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfAvailableForSaleSecuritiesReconciliationTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the reconciliation of available-for-sale securities from cost basis to fair value.",
        "label": "Schedule of Available-for-sale Securities Reconciliation [Table Text Block]",
        "terseLabel": "Available-for-sale Securities"
       }
      }
     },
     "localname": "ScheduleOfAvailableForSaleSecuritiesReconciliationTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfAvailableForSaleSecuritiesTable": {
     "auth_ref": [
      "r158",
      "r160",
      "r167",
      "r168",
      "r169",
      "r175",
      "r409",
      "r411"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails",
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsTable": {
     "auth_ref": [
      "r416",
      "r418",
      "r419",
      "r420"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A table disclosing the capital amounts and ratios as of the balance sheet date indicating whether the entity or entities are in compliance with regulatory capital requirements, by entity.",
        "label": "Schedule of Compliance with Regulatory Capital Requirements under Banking Regulations [Table]",
        "terseLabel": "Schedule of Compliance with Regulatory Capital Requirements under Banking Regulations [Table]"
       }
      }
     },
     "localname": "ScheduleOfComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalCapitalRequirementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsTextBlock": {
     "auth_ref": [
      "r416",
      "r418",
      "r419",
      "r420"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the capital amounts and ratios as of the balance sheet date, indicating whether the entity or entities are in compliance with regulatory capital requirements, by entity.",
        "label": "Schedule of Compliance with Regulatory Capital Requirements under Banking Regulations [Table Text Block]",
        "terseLabel": "Schedule of Compliance with Regulatory Capital Requirements under Banking Regulations"
       }
      }
     },
     "localname": "ScheduleOfComplianceWithRegulatoryCapitalRequirementsUnderBankingRegulationsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfDerivativeInstrumentsGainLossInStatementOfFinancialPerformanceTextBlock": {
     "auth_ref": [
      "r276",
      "r283",
      "r289"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the location and amount of derivative instruments and nonderivative instruments designated as hedging instruments reported before netting adjustments, and the amount of gain (loss) on derivative instruments and nonderivative instruments designated and qualified as hedging instruments.",
        "label": "Derivative Instruments, Gain (Loss) [Table Text Block]",
        "terseLabel": "Derivative Instruments, Gain (Loss) [Table Text Block]"
       }
      }
     },
     "localname": "ScheduleOfDerivativeInstrumentsGainLossInStatementOfFinancialPerformanceTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock": {
     "auth_ref": [
      "r280"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the location and fair value amounts of derivative instruments (and nonderivative instruments that are designated and qualify as hedging instruments) reported in the statement of financial position.",
        "label": "Schedule of Derivative Instruments in Statement of Financial Position, Fair Value [Table Text Block]",
        "terseLabel": "Schedule of Derivative Instruments in Statement of Financial Position, Fair Value"
       }
      }
     },
     "localname": "ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfFairValueHedgingInstrumentsStatementsOfFinancialPerformanceAndFinancialPositionLocationTableTextBlock": {
     "auth_ref": [
      "r281"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure for fair value hedging instruments of (a) the location and amount of gains and losses reported in the statement of financial performance and (b) the location and fair value amounts of the instruments reported in the statement of financial position.",
        "label": "Schedule of Fair Value Hedging Instruments, Statements of Financial Performance and Financial Position, Location [Table Text Block]",
        "terseLabel": "Schedule of Derivative Instruments By Type, Gain (Loss) in Statement of Financial Performance"
       }
      }
     },
     "localname": "ScheduleOfFairValueHedgingInstrumentsStatementsOfFinancialPerformanceAndFinancialPositionLocationTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfFinancingReceivablesPastDueTable": {
     "auth_ref": [
      "r183",
      "r199"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about aging analysis for financing receivable.",
        "label": "Financing Receivable, Past Due [Table]",
        "terseLabel": "Financing Receivable, Past Due [Table]"
       }
      }
     },
     "localname": "ScheduleOfFinancingReceivablesPastDueTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDelinquencyStatisticsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfHeldToMaturitySecuritiesLineItems": {
     "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": "Schedule of Held-to-maturity Securities [Line Items]",
        "terseLabel": "Schedule of Held-to-maturity Securities [Line Items]"
       }
      }
     },
     "localname": "ScheduleOfHeldToMaturitySecuritiesLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfHeldToMaturitySecuritiesTable": {
     "auth_ref": [
      "r166"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about investment in debt security measured at amortized cost (held-to-maturity).",
        "label": "Debt Securities, Held-to-maturity [Table]",
        "terseLabel": "Debt Securities, Held-to-maturity [Table]"
       }
      }
     },
     "localname": "ScheduleOfHeldToMaturitySecuritiesTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfMaturitiesOfLongTermDebtTableTextBlock": {
     "auth_ref": [
      "r233"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the combined aggregate amount of maturities and sinking fund requirements for all long-term borrowings for each of the five years following the date of the latest balance sheet date presented.",
        "label": "Schedule of Maturities of Long-term Debt [Table Text Block]",
        "terseLabel": "Schedule of Maturities of Long-term Debt"
       }
      }
     },
     "localname": "ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfOtherDerivativesNotDesignatedAsHedgingInstrumentsStatementsOfFinancialPerformanceAndFinancialPositionLocationTableTextBlock": {
     "auth_ref": [
      "r282",
      "r284"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of derivative instrument not designated or qualifying as hedging instrument.",
        "label": "Derivatives Not Designated as Hedging Instruments [Table Text Block]",
        "terseLabel": "Schedule of Derivative Instruments, Gain (Loss) in Statement of Financial Performance"
       }
      }
     },
     "localname": "ScheduleOfOtherDerivativesNotDesignatedAsHedgingInstrumentsStatementsOfFinancialPerformanceAndFinancialPositionLocationTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable": {
     "auth_ref": [
      "r91",
      "r344",
      "r345",
      "r346",
      "r347",
      "r348"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule of quantitative and qualitative information pertaining to related party transactions. Examples of related party transactions include transactions between (a) a parent company and its subsidiary; (b) subsidiaries of a common parent; (c) and entity and its principal owners; and (d) affiliates.",
        "label": "Schedule of Related Party Transactions, by Related Party [Table]",
        "terseLabel": "Schedule of Related Party Transactions, by Related Party [Table]"
       }
      }
     },
     "localname": "ScheduleOfRelatedPartyTransactionsByRelatedPartyTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/TransactionsWithCertainMembersCertainNonmembersAndOtherFhlbanksDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable": {
     "auth_ref": [
      "r115",
      "r117",
      "r118",
      "r121",
      "r208"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A table disclosing the profit or loss and total assets for each reportable segment of the entity. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table]",
        "terseLabel": "Schedule of Segment Reporting Information, by Segment [Table]"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfShortTermDebtTable": {
     "auth_ref": [
      "r19"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A table or schedule providing information pertaining to borrowings under which repayment was required in less than twelve months (or normal operating cycle, if longer) after its issuance. It may include: (1) description of the short-term debt arrangement; (2) identification of the lender or type of lender; (3) repayment terms; (4) weighted average interest rate; (5) carrying amount of funds borrowed under the specified short-term debt arrangement as of the balance sheet date and measures of the maximum and average amount outstanding during the period; (6) description of the refinancing of a short-term obligation when that obligation is excluded from current liabilities in the balance sheet; and (7) amount of a short-term obligation that has been excluded from current liabilities in the balance sheet because of a refinancing of the obligation.",
        "label": "Schedule of Short-term Debt [Table]",
        "terseLabel": "Schedule of Short-term Debt [Table]"
       }
      }
     },
     "localname": "ScheduleOfShortTermDebtTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfShortTermDebtTextBlock": {
     "auth_ref": [
      "r19"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of short-term debt arrangements (having initial terms of repayment within one year or the normal operating cycle, if longer) including: (1) description of the short-term debt arrangement; (2) identification of the lender or type of lender; (3) repayment terms; (4) weighted average interest rate; (5) carrying amount of funds borrowed under the specified short-term debt arrangement as of the balance sheet date; (6) description of the refinancing of a short-term obligation when that obligation is excluded from current liabilities in the balance sheet; and (7) amount of a short-term obligation that has been excluded from current liabilities in the balance sheet because of a refinancing of the obligation.",
        "label": "Schedule of Short-term Debt [Table Text Block]",
        "terseLabel": "Schedule of Short-term Debt"
       }
      }
     },
     "localname": "ScheduleOfShortTermDebtTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfStockByClassTable": {
     "auth_ref": [
      "r24",
      "r94",
      "r238",
      "r239",
      "r243",
      "r245",
      "r246",
      "r247",
      "r248",
      "r249",
      "r250",
      "r251"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule detailing information related to equity by class of stock. Class of stock includes common, convertible, and preferred stocks which are not redeemable or redeemable solely at the option of the issuer. It also includes preferred stock with redemption features that are solely within the control of the issuer and mandatorily redeemable stock if redemption is required to occur only upon liquidation or termination of the reporting entity.",
        "label": "Schedule of Stock by Class [Table]",
        "terseLabel": "Capital [Table]"
       }
      }
     },
     "localname": "ScheduleOfStockByClassTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsLineItems": {
     "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 and Equity Securities, FV-NI [Line Items]",
        "terseLabel": "Trading Securities"
       }
      }
     },
     "localname": "ScheduleOfTradingSecuritiesAndOtherTradingAssetsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about investment in debt security measured at fair value with change in fair value recognized in net income (trading) and investment in equity security with change in fair value recognized in net income (FV-NI).",
        "label": "Debt Securities, Trading, and Equity Securities, FV-NI [Table]",
        "terseLabel": "Schedule of Trading Securities and Other Trading Assets [Table]"
       }
      }
     },
     "localname": "ScheduleOfTradingSecuritiesAndOtherTradingAssetsTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfUnrealizedLossOnInvestmentsTableTextBlock": {
     "auth_ref": [
      "r167"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For all investments in an unrealized loss position, including those for which other-than-temporary impairments have not been recognized in earnings (including investments for which a portion of an other-than-temporary impairment has been recognized in other comprehensive income), a tabular disclosure of the aggregate related fair value of investments with unrealized losses and the aggregate amount of unrealized losses (that is, the amount by which amortized cost basis exceeds fair value).",
        "label": "Schedule of Unrealized Loss on Investments [Table Text Block]",
        "terseLabel": "Schedule of Unrealized Loss on Investments"
       }
      }
     },
     "localname": "ScheduleOfUnrealizedLossOnInvestmentsTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SecuritiesPurchasedUnderAgreementsToResell": {
     "auth_ref": [
      "r28",
      "r31",
      "r37",
      "r93",
      "r381"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 3.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after the effects of master netting arrangements, of funds outstanding loaned in the form of a security resale agreement between the entity and another party for the purchase and resale of identical or substantially the same securities at a date certain for a specified price. Includes purchases of participations in pools of securities that are subject to a resale agreement, assets not subject to a master netting arrangement and not elected to be offset.",
        "label": "Securities Purchased under Agreements to Resell",
        "terseLabel": "Securities purchased under agreements to resell"
       }
      }
     },
     "localname": "SecuritiesPurchasedUnderAgreementsToResell",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SecurityOwnedAndPledgedAsCollateralFairValue": {
     "auth_ref": [
      "r357",
      "r358"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of financial instrument held by the entity for its own account (proprietary securities) for trading or investment purposes that are carried at fair value and pledged to counterparties as collateral for financing transactions.",
        "label": "Security Owned and Pledged as Collateral, Fair Value",
        "terseLabel": "Security Owned and Pledged as Collateral, Fair Value"
       }
      }
     },
     "localname": "SecurityOwnedAndPledgedAsCollateralFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SegmentDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Components of an entity that engage in business activities from which they may earn revenue and incur expenses, including transactions with other components of the same entity.",
        "label": "Segments [Domain]",
        "terseLabel": "Segment [Domain]"
       }
      }
     },
     "localname": "SegmentDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SegmentReportingAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Segment Reporting [Abstract]"
       }
      }
     },
     "localname": "SegmentReportingAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_SegmentReportingDisclosureTextBlock": {
     "auth_ref": [
      "r124"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for reporting segments including data and tables. Reportable segments include those that meet any of the following quantitative thresholds a) it's reported revenue, including sales to external customers and intersegment sales or transfers is 10 percent or more of the combined revenue, internal and external, of all operating segments b) the absolute amount of its reported profit or loss is 10 percent or more of the greater, in absolute amount of 1) the combined reported profit of all operating segments that did not report a loss or 2) the combined reported loss of all operating segments that did report a loss c) its assets are 10 percent or more of the combined assets of all operating segments.",
        "label": "Segment Reporting Disclosure [Text Block]",
        "terseLabel": "Segment Information"
       }
      }
     },
     "localname": "SegmentReportingDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformation"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SegmentReportingInformationLineItems": {
     "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": "Segment Reporting Information [Line Items]",
        "terseLabel": "Segment Reporting Information [Line Items]"
       }
      }
     },
     "localname": "SegmentReportingInformationLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SegmentReportingPolicyPolicyTextBlock": {
     "auth_ref": [
      "r90"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for segment reporting.",
        "label": "Segment Reporting, Policy [Policy Text Block]",
        "terseLabel": "Segment Reporting, Policy"
       }
      }
     },
     "localname": "SegmentReportingPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SharesIssued": {
     "auth_ref": [
      "r244"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares of stock issued as of the balance sheet date, including shares that had been issued and were previously outstanding but which are now held in the treasury.",
        "label": "Shares, Issued",
        "periodEndLabel": "Balance, Shares",
        "periodStartLabel": "Balance, Shares"
       }
      }
     },
     "localname": "SharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_SharesSubjectToMandatoryRedemptionSettlementTermsAmount": {
     "auth_ref": [
      "r237"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 3.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount that would be paid, determined under the conditions specified in the contract, if the holder of the share has the right to redeem the shares.",
        "label": "Financial Instruments Subject to Mandatory Redemption, Settlement Terms, Share Value, Amount",
        "periodEndLabel": "Balance at the end of the period",
        "periodStartLabel": "Balance at the beginning of the period",
        "terseLabel": "Mandatorily redeemable capital stock",
        "totalLabel": "Total"
       }
      }
     },
     "localname": "SharesSubjectToMandatoryRedemptionSettlementTermsAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalByRedemptionPeriodDetails",
      "http://www.fhlbsf.com/role/CapitalExcessCapitalStockDetails",
      "http://www.fhlbsf.com/role/CapitalMandatorilyRedeemableCapitalStockDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SharesSubjectToMandatoryRedemptionSettlementTermsAmountAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Financial Instruments Subject to Mandatory Redemption, Settlement Terms, Share Value, Amount [Abstract]"
       }
      }
     },
     "localname": "SharesSubjectToMandatoryRedemptionSettlementTermsAmountAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShortTermDebtLineItems": {
     "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": "Short-term Debt [Line Items]",
        "terseLabel": "Short-term Debt [Line Items]"
       }
      }
     },
     "localname": "ShortTermDebtLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShortTermDebtMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debt arrangement having an initial term within one year or the normal operating cycle, if longer.",
        "label": "Short-term Debt [Member]",
        "terseLabel": "Discount notes"
       }
      }
     },
     "localname": "ShortTermDebtMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShortTermDebtTypeAxis": {
     "auth_ref": [
      "r19"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of short-term debt arrangement.",
        "label": "Short-term Debt, Type [Axis]",
        "terseLabel": "Short-term Debt, Type [Axis]"
       }
      }
     },
     "localname": "ShortTermDebtTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShortTermDebtTypeDomain": {
     "auth_ref": [
      "r17"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Type of short-term debt arrangement, such as notes, line of credit, commercial paper, asset-based financing, project financing, letter of credit financing.",
        "label": "Short-term Debt, Type [Domain]",
        "terseLabel": "Short-term Debt, Type [Domain]"
       }
      }
     },
     "localname": "ShortTermDebtTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShortTermDebtWeightedAverageInterestRate": {
     "auth_ref": [
      "r18"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate of short-term debt outstanding calculated at point in time.",
        "label": "Short-term Debt, Weighted Average Interest Rate, at Point in Time",
        "terseLabel": "Short-term Debt, Weighted Average Interest Rate, at Point in Time"
       }
      }
     },
     "localname": "ShortTermDebtWeightedAverageInterestRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationDiscountNotesDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ShorttermDebtFairValue": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This element represents the portion of the balance sheet assertion valued at fair value by the entity whether such amount is presented as a separate caption or as a parenthetical disclosure. Additionally, this element may be used in connection with the fair value disclosures required in the footnote disclosures to the financial statements. The element may be used in both the balance sheet and disclosure in the same submission. This item represents the amount of short-term debt existing as of the balance sheet date.",
        "label": "Short-term Debt, Fair Value",
        "terseLabel": "Discount notes"
       }
      }
     },
     "localname": "ShorttermDebtFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StandbyLettersOfCreditMember": {
     "auth_ref": [
      "r224",
      "r232",
      "r260",
      "r438"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "An irrevocable undertaking (typically by a financial institution) to guarantee payment of a specified financial obligation.",
        "label": "Standby Letters of Credit [Member]",
        "terseLabel": "Standby letters of credit",
        "verboseLabel": "Standby letters of credit outstanding"
       }
      }
     },
     "localname": "StandbyLettersOfCreditMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CommitmentsAndContingenciesOffBalanceSheetCommitmentsDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_StatementBusinessSegmentsAxis": {
     "auth_ref": [
      "r0",
      "r117",
      "r208",
      "r210",
      "r212",
      "r213",
      "r433"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by business segments.",
        "label": "Segments [Axis]",
        "terseLabel": "Statement, Business Segments [Axis]"
       }
      }
     },
     "localname": "StatementBusinessSegmentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementClassOfStockAxis": {
     "auth_ref": [
      "r8",
      "r9",
      "r10",
      "r244"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by the different classes of stock of the entity.",
        "label": "Class of Stock [Axis]",
        "terseLabel": "Class of Stock [Axis]"
       }
      }
     },
     "localname": "StatementClassOfStockAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementEquityComponentsAxis": {
     "auth_ref": [
      "r25",
      "r244"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by component of equity.",
        "label": "Equity Components [Axis]",
        "terseLabel": "Equity Components [Axis]",
        "verboseLabel": "Equity Components [Axis]"
       }
      }
     },
     "localname": "StatementEquityComponentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "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/2019-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/2019-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/2019-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/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementTable": {
     "auth_ref": [],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesNewIssues": {
     "auth_ref": [
      "r9",
      "r10",
      "r244",
      "r251"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of new stock issued during the period.",
        "label": "Stock Issued During Period, Shares, New Issues",
        "terseLabel": "Issuance of capital stock, shares"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesNewIssues",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodValueNewIssues": {
     "auth_ref": [
      "r9",
      "r10",
      "r244",
      "r251"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Equity impact of the value of new stock issued during the period. Includes shares issued in an initial public offering or a secondary public offering.",
        "label": "Stock Issued During Period, Value, New Issues",
        "terseLabel": "Issuance of capital stock, value"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodValueNewIssues",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockRepurchasedDuringPeriodShares": {
     "auth_ref": [
      "r9",
      "r10",
      "r244",
      "r251"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares that have been repurchased during the period and have not been retired and are not held in treasury. Some state laws may govern the circumstances under which an entity may acquire its own stock and prescribe the accounting treatment therefore. This element is used when state law does not recognize treasury stock.",
        "label": "Stock Repurchased During Period, Shares",
        "negatedTerseLabel": "Repurchase of capital stock, shares"
       }
      }
     },
     "localname": "StockRepurchasedDuringPeriodShares",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockRepurchasedDuringPeriodValue": {
     "auth_ref": [
      "r9",
      "r10",
      "r244",
      "r251"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Equity impact of the value of stock that has been repurchased during the period and has not been retired and is not held in treasury. Some state laws may mandate the circumstances under which an entity may acquire its own stock and prescribe the accounting treatment therefore. This element is used when state law does not recognize treasury stock.",
        "label": "Stock Repurchased During Period, Value",
        "negatedTerseLabel": "Repurchase of capital stock, value"
       }
      }
     },
     "localname": "StockRepurchasedDuringPeriodValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquity": {
     "auth_ref": [
      "r10",
      "r14",
      "r15",
      "r139"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 2.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": "Balance",
        "periodStartLabel": "Balance",
        "terseLabel": "Stockholders' Equity Attributable to Parent",
        "totalLabel": "Total Capital"
       }
      }
     },
     "localname": "StockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AccumulatedOtherComprehensiveIncomeLossDetails",
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails",
      "http://www.fhlbsf.com/role/StatementsOfCapitalAccounts",
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Stockholders' Equity Attributable to Parent [Abstract]",
        "terseLabel": "Capital:"
       }
      }
     },
     "localname": "StockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockholdersEquityNoteDisclosureTextBlock": {
     "auth_ref": [
      "r252"
     ],
     "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": "Capital"
       }
      }
     },
     "localname": "StockholdersEquityNoteDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/Capital"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_StockholdersEquityNumberOfSharesParValueAndOtherDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Stockholders' Equity, Number of Shares, Par Value and Other Disclosures [Abstract]",
        "terseLabel": "Capital:"
       }
      }
     },
     "localname": "StockholdersEquityNumberOfSharesParValueAndOtherDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockholdersEquityPolicyTextBlock": {
     "auth_ref": [
      "r89",
      "r90",
      "r242"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for its capital stock transactions, including dividends and accumulated other comprehensive income.",
        "label": "Stockholders' Equity, Policy [Policy Text Block]",
        "terseLabel": "Stockholders' Equity, Policy"
       }
      }
     },
     "localname": "StockholdersEquityPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/BasisOfPresentationPolicies",
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_StockholdersEquityTotalMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying amount as of the balance sheet date of total stockholders' equity, when it serves as a benchmark in a concentration of risk calculation. Also called Net Assets.",
        "label": "Stockholders' Equity, Total [Member]",
        "terseLabel": "Total Capital Stock, 10% or more"
       }
      }
     },
     "localname": "StockholdersEquityTotalMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalConcentrationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SubsequentEventMember": {
     "auth_ref": [],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SubsequentEventTypeAxis": {
     "auth_ref": [
      "r350"
     ],
     "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]",
        "terseLabel": "Subsequent Event Type [Axis]"
       }
      }
     },
     "localname": "SubsequentEventTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsequentEventTypeDomain": {
     "auth_ref": [
      "r350"
     ],
     "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]",
        "terseLabel": "Subsequent Event Type [Domain]"
       }
      }
     },
     "localname": "SubsequentEventTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SubsequentEventsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Subsequent Events [Abstract]",
        "terseLabel": "Subsequent Events [Abstract]"
       }
      }
     },
     "localname": "SubsequentEventsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/CapitalRetainedEarningsAndDividendPolicyDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsequentEventsPolicyPolicyTextBlock": {
     "auth_ref": [
      "r90"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for reporting subsequent events.",
        "label": "Subsequent Events, Policy [Policy Text Block]",
        "terseLabel": "Subsequent Events, Policy [Policy Text Block]"
       }
      }
     },
     "localname": "SubsequentEventsPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SubsequentEventsTextBlock": {
     "auth_ref": [
      "r351"
     ],
     "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/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SubsequentEvents"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SupplementalCashFlowInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Supplemental Cash Flow Information [Abstract]",
        "terseLabel": "Supplemental Disclosures:"
       }
      }
     },
     "localname": "SupplementalCashFlowInformationAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_TimeDepositsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Time Deposits [Line Items]",
        "terseLabel": "Demand Deposits [Line Items]"
       }
      }
     },
     "localname": "TimeDepositsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_TradingSecurities": {
     "auth_ref": [
      "r390"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of investment in debt security measured at fair value with change in fair value recognized in net income (trading) and investment in equity security measured at fair value with change in fair value recognized in net income (FV-NI).",
        "label": "Debt Securities, Trading, and Equity Securities, FV-NI",
        "terseLabel": "Trading securities"
       }
      }
     },
     "localname": "TradingSecurities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TradingSecuritiesAndCertainTradingAssetsTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of investment in debt security measured at fair value with change in fair value recognized in net income (trading) and investment in equity security measured at fair value with change in fair value recognized in net income (FV-NI).",
        "label": "Debt Securities, Trading, and Equity Securities, FV-NI [Table Text Block]",
        "terseLabel": "Trading Securities (and Certain Trading Assets)"
       }
      }
     },
     "localname": "TradingSecuritiesAndCertainTradingAssetsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_TradingSecuritiesDebt": {
     "auth_ref": [
      "r147",
      "r148"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCondition": {
       "order": 12.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 net income (trading).",
        "label": "Debt Securities, Trading",
        "terseLabel": "Trading Securities"
       }
      }
     },
     "localname": "TradingSecuritiesDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCondition"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TradingSecuritiesUnrealizedHoldingGainLoss": {
     "auth_ref": [],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfIncome": {
       "order": 1.0,
       "parentTag": "us-gaap_NoninterestIncome",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of unrealized holding gain (loss) recognized in the income statement for investments in debt and equity securities and other forms of securities that provide ownership interests classified as trading.",
        "label": "Trading Securities, Change in Unrealized Holding Gain (Loss)",
        "terseLabel": "Net gain/(loss) on trading securities",
        "verboseLabel": "Net unrealized gain/(loss) on trading securities"
       }
      }
     },
     "localname": "TradingSecuritiesUnrealizedHoldingGainLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/StatementsOfIncome"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TransactionDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Agreement between buyer and seller for the exchange of financial instruments.",
        "label": "Transaction [Domain]",
        "terseLabel": "Transaction [Domain]"
       }
      }
     },
     "localname": "TransactionDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_TransactionTypeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of agreement between buyer and seller for the exchange of financial instruments.",
        "label": "Transaction Type [Axis]",
        "terseLabel": "Transaction Type [Axis]"
       }
      }
     },
     "localname": "TransactionTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DerivativesAndHedgingActivitiesOffsettingOfDerivativeAssetsAndDerivativeLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain": {
     "auth_ref": [
      "r359"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Instrument or contract that imposes a contractual obligation to deliver cash or another financial instrument or to exchange other financial instruments on potentially unfavorable terms and conveys a contractual right to receive cash or another financial instrument or to exchange other financial instruments on potentially favorable terms.",
        "label": "Financial Instruments [Domain]",
        "terseLabel": "Financial Instruments [Domain]",
        "verboseLabel": "Financial Instruments [Domain]"
       }
      }
     },
     "localname": "TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/AdvancesRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/FairValueLevel3Details",
      "http://www.fhlbsf.com/role/InvestmentsAfsByContractualMaturityDetails",
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsClassificationOfHeldToMaturitySecuritiesDetails",
      "http://www.fhlbsf.com/role/InvestmentsNarrativeDetails",
      "http://www.fhlbsf.com/role/InvestmentsSignificantInputsOnPlrmbsDetails",
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails",
      "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/MortgageLoansHeldForPortfolioDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_USGovernmentAgenciesDebtSecuritiesMember": {
     "auth_ref": [
      "r255",
      "r382"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debentures, notes, and other debt securities issued by US government agencies, for example, but not limited to, Government National Mortgage Association (GNMA or Ginnie Mae). Excludes US treasury securities and debt issued by government-sponsored Enterprises (GSEs), for example, but is not limited to, Federal Home Loan Mortgage Corporation (FHLMC or Freddie Mac), Federal National Mortgage Association (FNMA or Fannie Mae), and the Federal Home Loan Bank (FHLB).",
        "label": "US Government Agencies Debt Securities [Member]",
        "terseLabel": "US Government Agencies Debt Securities [Member]"
       }
      }
     },
     "localname": "USGovernmentAgenciesDebtSecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsSummaryOfAfsSecuritiesWithUnrealizedLossesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_USTreasurySecuritiesMember": {
     "auth_ref": [
      "r255",
      "r259",
      "r382"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This category includes information about debt securities issued by the United States Department of the Treasury and backed by the United States government. Such securities primarily consist of treasury bills (short-term maturities - one year or less), treasury notes (intermediate term maturities - two to ten years), and treasury bonds (long-term maturities - ten to thirty years).",
        "label": "US Treasury Securities [Member]",
        "terseLabel": "US Treasury Securities [Member]"
       }
      }
     },
     "localname": "USTreasurySecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/InvestmentsAfsSecuritiesByMajorTypeDetails",
      "http://www.fhlbsf.com/role/InvestmentsTradingSecuritiesByMajorTypeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_UnrealizedGainLossOnDerivatives": {
     "auth_ref": [
      "r81"
     ],
     "calculation": {
      "http://www.fhlbsf.com/role/StatementsOfCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net change in the difference between the fair value and the carrying value, or in the comparative fair values, of derivative instruments, including options, swaps, futures, and forward contracts, held at each balance sheet date, that was included in earnings for the period.",
        "label": "Unrealized Gain (Loss) on Derivatives",
        "negatedLabel": "Change in net derivatives and hedging activities"
       }
      }
     },
     "localname": "UnrealizedGainLossOnDerivatives",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/StatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnsecuredDebtMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debt obligation not collateralized by pledge of, mortgage of or other lien on the entity's assets.",
        "label": "Unsecured Debt [Member]",
        "terseLabel": "Consolidated obligation bonds",
        "verboseLabel": "Bonds"
       }
      }
     },
     "localname": "UnsecuredDebtMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/ConsolidatedObligationsConsolidatedObligationBondsNoncallableAndCallableDetails",
      "http://www.fhlbsf.com/role/ConsolidatedObligationsRedemptionTermsDetails",
      "http://www.fhlbsf.com/role/FairValueCarryingValueAndFairValueOfFinancialInstrumentsDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueDifferenceBetweenFairValueAndRemainingContractualPrincipalBalanceOutstandingDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueMeasuredOnRecurringAndNonrecurringBasisDetails",
      "http://www.fhlbsf.com/role/FairValueFairValueOptionDetails",
      "http://www.fhlbsf.com/role/StatementsOfConditionParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_UseOfEstimates": {
     "auth_ref": [
      "r104",
      "r105",
      "r106",
      "r107",
      "r112",
      "r113",
      "r114"
     ],
     "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, Policy [Policy Text Block]"
       }
      }
     },
     "localname": "UseOfEstimates",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/SummaryOfSignificantAccountingPoliciesAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_WeightedAverageRateDomesticDeposit": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average interest rate calculated at point in time for domestic deposit liability.",
        "label": "Weighted Average Rate, Interest-bearing Domestic Deposits, Point in Time",
        "terseLabel": "Weighted Average Rate"
       }
      }
     },
     "localname": "WeightedAverageRateDomesticDeposit",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.fhlbsf.com/role/DepositsDetails"
     ],
     "xbrltype": "percentItemType"
    }
   },
   "unitCount": 6
  }
 },
 "std_ref": {
  "r0": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "205",
   "URI": "http://asc.fasb.org/extlink&oid=109222650&loc=d3e1361-107760"
  },
  "r1": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6935-107765"
  },
  "r10": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r100": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.12-04.(a))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e24072-122690"
  },
  "r101": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "235",
   "URI": "http://asc.fasb.org/topic&trid=2122369"
  },
  "r102": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22499-107794"
  },
  "r103": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "250",
   "URI": "http://asc.fasb.org/topic&trid=2122394"
  },
  "r104": {
   "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"
  },
  "r105": {
   "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"
  },
  "r106": {
   "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"
  },
  "r107": {
   "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"
  },
  "r108": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6327-108592"
  },
  "r109": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6351-108592"
  },
  "r11": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(3)(i))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r110": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6404-108592"
  },
  "r111": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6442-108592"
  },
  "r112": {
   "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"
  },
  "r113": {
   "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"
  },
  "r114": {
   "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"
  },
  "r115": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8721-108599"
  },
  "r116": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r117": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r118": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8813-108599"
  },
  "r119": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8906-108599"
  },
  "r12": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(3)(ii))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r120": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8906-108599"
  },
  "r121": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8906-108599"
  },
  "r122": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "31",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8924-108599"
  },
  "r123": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "42",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e9054-108599"
  },
  "r124": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "280",
   "URI": "http://asc.fasb.org/topic&trid=2134510"
  },
  "r125": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118952595&loc=d3e4428-111522"
  },
  "r126": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=SL6953423-111524"
  },
  "r127": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=SL6953423-111524"
  },
  "r128": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=SL6953423-111524"
  },
  "r129": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=SL6953423-111524"
  },
  "r13": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r130": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=SL6953659-111524"
  },
  "r131": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=d3e5066-111524"
  },
  "r132": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "35",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=SL49126937-111524"
  },
  "r133": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=d3e5074-111524"
  },
  "r134": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=d3e5093-111524"
  },
  "r135": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=d3e5111-111524"
  },
  "r136": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=d3e5111-111524"
  },
  "r137": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=d3e5111-111524"
  },
  "r138": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=SL6953401-111524"
  },
  "r139": {
   "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=27010918&loc=d3e74512-122707"
  },
  "r14": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r140": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 6.L.1)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=27010918&loc=d3e74567-122707"
  },
  "r141": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/subtopic&trid=2196772"
  },
  "r142": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "SubTopic": "20",
   "Topic": "310",
   "URI": "http://asc.fasb.org/subtopic&trid=2196816"
  },
  "r143": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(b)(1)(ii)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118939070&loc=d3e15032-111544"
  },
  "r144": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Subparagraph": "(c),(d)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118985780&loc=d3e24820-111560"
  },
  "r145": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118985780&loc=d3e24883-111560"
  },
  "r146": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "35A",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118985780&loc=SL6284312-111560"
  },
  "r147": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118954083&loc=d3e26610-111562"
  },
  "r148": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118954083&loc=d3e26610-111562"
  },
  "r149": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118954083&loc=d3e26853-111562"
  },
  "r15": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r150": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118954083&loc=SL6284427-111562"
  },
  "r151": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=SL6283291-111563"
  },
  "r152": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27161-111563"
  },
  "r153": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(aa)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27161-111563"
  },
  "r154": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(aaa)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27161-111563"
  },
  "r155": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27161-111563"
  },
  "r156": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27161-111563"
  },
  "r157": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27161-111563"
  },
  "r158": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27161-111563"
  },
  "r159": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27198-111563"
  },
  "r16": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r160": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27198-111563"
  },
  "r161": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27232-111563"
  },
  "r162": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(aa)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27232-111563"
  },
  "r163": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27232-111563"
  },
  "r164": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27232-111563"
  },
  "r165": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(dd)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27232-111563"
  },
  "r166": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27232-111563"
  },
  "r167": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27290-111563"
  },
  "r168": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27337-111563"
  },
  "r169": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27340-111563"
  },
  "r17": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r170": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=SL6284393-111563"
  },
  "r171": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=SL6284393-111563"
  },
  "r172": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=SL6284393-111563"
  },
  "r173": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=SL6284393-111563"
  },
  "r174": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=SL6284393-111563"
  },
  "r175": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)-(d)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27357-111563"
  },
  "r176": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=d3e27357-111563"
  },
  "r177": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "320",
   "URI": "http://asc.fasb.org/topic&trid=2196928"
  },
  "r178": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(2)",
   "Topic": "323",
   "URI": "http://asc.fasb.org/extlink&oid=114001798&loc=d3e33918-111571"
  },
  "r179": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118950378&loc=SL82887624-210437"
  },
  "r18": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(b))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r180": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919244-210447"
  },
  "r181": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919244-210447"
  },
  "r182": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919249-210447"
  },
  "r183": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919253-210447"
  },
  "r184": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919258-210447"
  },
  "r185": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919258-210447"
  },
  "r186": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919258-210447"
  },
  "r187": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919258-210447"
  },
  "r188": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919260-210447"
  },
  "r189": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919272-210447"
  },
  "r19": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r190": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919230-210447"
  },
  "r191": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919230-210447"
  },
  "r192": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919232-210447"
  },
  "r193": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955255&loc=SL82921830-210448"
  },
  "r194": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955255&loc=SL82921833-210448"
  },
  "r195": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955255&loc=SL82921835-210448"
  },
  "r196": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955255&loc=SL82921835-210448"
  },
  "r197": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955255&loc=SL82921842-210448"
  },
  "r198": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "79",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955255&loc=SL82922352-210448"
  },
  "r199": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "80",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955255&loc=SL82922355-210448"
  },
  "r2": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e7018-107765"
  },
  "r20": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r200": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118942338&loc=SL82898722-210454"
  },
  "r201": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922888-210455"
  },
  "r202": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922888-210455"
  },
  "r203": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922895-210455"
  },
  "r204": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922900-210455"
  },
  "r205": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(i)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922900-210455"
  },
  "r206": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922900-210455"
  },
  "r207": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118942371&loc=SL82922954-210456"
  },
  "r208": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13816-109267"
  },
  "r209": {
   "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"
  },
  "r21": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r210": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=109226691&loc=d3e2941-110230"
  },
  "r211": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Subparagraph": "(b)",
   "Topic": "405",
   "URI": "http://asc.fasb.org/extlink&oid=84228828&loc=SL34748401-199205"
  },
  "r212": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r213": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(d))",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r214": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "440",
   "URI": "http://asc.fasb.org/topic&trid=2144648"
  },
  "r215": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14326-108349"
  },
  "r216": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14615-108349"
  },
  "r217": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14394-108349"
  },
  "r218": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14435-108349"
  },
  "r219": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14453-108349"
  },
  "r22": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.22)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r220": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14472-108349"
  },
  "r221": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14557-108349"
  },
  "r222": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "450",
   "URI": "http://asc.fasb.org/topic&trid=2127136"
  },
  "r223": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "15",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=99404985&loc=d3e10037-110241"
  },
  "r224": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12021-110248"
  },
  "r225": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12021-110248"
  },
  "r226": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12053-110248"
  },
  "r227": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12069-110248"
  },
  "r228": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12069-110248"
  },
  "r229": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(4)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12069-110248"
  },
  "r23": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.25)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r230": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12069-110248"
  },
  "r231": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=68068213&loc=d3e12565-110249"
  },
  "r232": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118956092&loc=d3e12803-110250"
  },
  "r233": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=6802200&loc=d3e1835-112601"
  },
  "r234": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=6802200&loc=SL6230698-112601"
  },
  "r235": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(1)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=109500613&loc=SL6031897-161870"
  },
  "r236": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "470",
   "URI": "http://asc.fasb.org/topic&trid=2208564"
  },
  "r237": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "480",
   "URI": "http://asc.fasb.org/extlink&oid=109262807&loc=d3e22047-110879"
  },
  "r238": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(CFRR 211.02)",
   "Topic": "480",
   "URI": "http://asc.fasb.org/extlink&oid=65877616&loc=d3e177068-122764"
  },
  "r239": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=65888546&loc=d3e21300-112643"
  },
  "r24": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.28,29)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r240": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=65888546&loc=d3e21332-112643"
  },
  "r241": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=65888546&loc=d3e21346-112643"
  },
  "r242": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21459-112644"
  },
  "r243": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21553-112644"
  },
  "r244": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21463-112644"
  },
  "r245": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21475-112644"
  },
  "r246": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21484-112644"
  },
  "r247": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21488-112644"
  },
  "r248": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21506-112644"
  },
  "r249": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21521-112644"
  },
  "r25": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r250": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21538-112644"
  },
  "r251": {
   "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=27012166&loc=d3e187085-122770"
  },
  "r252": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "505",
   "URI": "http://asc.fasb.org/topic&trid=2208762"
  },
  "r253": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130545-203045"
  },
  "r254": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944142&loc=SL49130690-203046-203046"
  },
  "r255": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(ii)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118255775&loc=d3e1928-114920"
  },
  "r256": {
   "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=118255775&loc=d3e1928-114920"
  },
  "r257": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(j)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118255775&loc=d3e1928-114920"
  },
  "r258": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(n)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118255775&loc=d3e1928-114920"
  },
  "r259": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118257860&loc=d3e4179-114921"
  },
  "r26": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r260": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "15",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=116873149&loc=d3e923-111674"
  },
  "r261": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "19",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=108774443&loc=SL4569616-111683"
  },
  "r262": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=108774443&loc=SL4569643-111683"
  },
  "r263": {
   "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"
  },
  "r264": {
   "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"
  },
  "r265": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5B",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=107671284&loc=SL5844817-113951"
  },
  "r266": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=77984636&loc=d3e40733-113955"
  },
  "r267": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=117331979&loc=d3e41228-113958"
  },
  "r268": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5579240-113959"
  },
  "r269": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5579245-113959"
  },
  "r27": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(30)(a)(3)(ii))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r270": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5579245-113959"
  },
  "r271": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5580258-113959"
  },
  "r272": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(2)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=d3e41620-113959"
  },
  "r273": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=d3e41620-113959"
  },
  "r274": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=d3e41638-113959"
  },
  "r275": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5618551-113959"
  },
  "r276": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5618551-113959"
  },
  "r277": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a),(c)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624163-113959"
  },
  "r278": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624163-113959"
  },
  "r279": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624163-113959"
  },
  "r28": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=49176635&loc=d3e9760-107771"
  },
  "r280": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624163-113959"
  },
  "r281": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624171-113959"
  },
  "r282": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624171-113959"
  },
  "r283": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624171-113959"
  },
  "r284": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4CC",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL109998890-113959"
  },
  "r285": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624177-113959"
  },
  "r286": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624177-113959"
  },
  "r287": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624177-113959"
  },
  "r288": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624177-113959"
  },
  "r289": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4E",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624181-113959"
  },
  "r29": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=51824906&loc=SL20225862-175312"
  },
  "r290": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4EE",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL109999712-113959"
  },
  "r291": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4EE",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL109999712-113959"
  },
  "r292": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4EE",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL109999712-113959"
  },
  "r293": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4EEEE",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL109999725-113959"
  },
  "r294": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4H",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624258-113959"
  },
  "r295": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4H",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624258-113959"
  },
  "r296": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4K",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(4)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5708775-113959"
  },
  "r297": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=d3e41641-113959"
  },
  "r298": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=d3e41678-113959"
  },
  "r299": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=d3e41678-113959"
  },
  "r3": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r30": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=51824906&loc=SL20225862-175312"
  },
  "r300": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=d3e41678-113959"
  },
  "r301": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "182",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=116861445&loc=SL5629052-113961"
  },
  "r302": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "15",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=118946261&loc=d3e48542-113965"
  },
  "r303": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "15",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=56949186&loc=d3e50579-113967"
  },
  "r304": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "25",
   "Subparagraph": "(a)(1)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109977999&loc=d3e76258-113986"
  },
  "r305": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "25",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109977999&loc=d3e76258-113986"
  },
  "r306": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "815",
   "URI": "http://asc.fasb.org/topic&trid=2229140"
  },
  "r307": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r308": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r309": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bb)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r31": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=51824906&loc=SL20225862-175312"
  },
  "r310": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bbb)(1)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r311": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bbb)(2)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r312": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r313": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r314": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1a)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r315": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r316": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(3)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r317": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&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=117815213&loc=d3e19207-110258"
  },
  "r319": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2C",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=SL7498348-110258"
  },
  "r32": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=51824906&loc=SL20225862-175312"
  },
  "r320": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19279-110258"
  },
  "r321": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=SL6742756-110258"
  },
  "r322": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=SL6742756-110258"
  },
  "r323": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "60",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=7493716&loc=d3e21868-110260"
  },
  "r324": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=116690757&loc=d3e13220-108610"
  },
  "r325": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13279-108611"
  },
  "r326": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13433-108611"
  },
  "r327": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13467-108611"
  },
  "r328": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13476-108611"
  },
  "r329": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13531-108611"
  },
  "r33": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(2)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=51824906&loc=SL20225862-175312"
  },
  "r330": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13537-108611"
  },
  "r331": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13537-108611"
  },
  "r332": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)(2)",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=75031198&loc=d3e14064-108612"
  },
  "r333": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=75031198&loc=d3e14064-108612"
  },
  "r334": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=75031198&loc=d3e14172-108612"
  },
  "r335": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=75031198&loc=d3e14172-108612"
  },
  "r336": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "31",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=75031198&loc=d3e14210-108612"
  },
  "r337": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=75031198&loc=d3e14217-108612"
  },
  "r338": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "230",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=98513438&loc=d3e33268-110906"
  },
  "r339": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=6450988&loc=d3e26243-108391"
  },
  "r34": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=51824906&loc=SL20225862-175312"
  },
  "r340": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=114775744&loc=d3e28541-108399"
  },
  "r341": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=114775744&loc=d3e28551-108399"
  },
  "r342": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=114775744&loc=d3e28555-108399"
  },
  "r343": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=114775985&loc=d3e28878-108400"
  },
  "r344": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864"
  },
  "r345": {
   "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"
  },
  "r346": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39622-107864"
  },
  "r347": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39678-107864"
  },
  "r348": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39691-107864"
  },
  "r349": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "850",
   "URI": "http://asc.fasb.org/topic&trid=2122745"
  },
  "r35": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=51824906&loc=SL20225862-175312"
  },
  "r350": {
   "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"
  },
  "r351": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "855",
   "URI": "http://asc.fasb.org/topic&trid=2122774"
  },
  "r352": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r353": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(1)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r354": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(2)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r355": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(3)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r356": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(2)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=SL51823488-111719"
  },
  "r357": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=66007379&loc=d3e113888-111728"
  },
  "r358": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(b)(1)(i)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=109249958&loc=SL6224234-111729"
  },
  "r359": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "50",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=116651436&loc=d3e122625-111746"
  },
  "r36": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=51824906&loc=SL20225877-175312"
  },
  "r360": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e61929-109447"
  },
  "r361": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e61929-109447"
  },
  "r362": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e62059-109447"
  },
  "r363": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e62059-109447"
  },
  "r364": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e62395-109447"
  },
  "r365": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e62395-109447"
  },
  "r366": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "33",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e62479-109447"
  },
  "r367": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "33",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e62479-109447"
  },
  "r368": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "35A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=SL6807758-109447"
  },
  "r369": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "35A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=SL6807758-109447"
  },
  "r37": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=99393222&loc=SL20226008-175313"
  },
  "r370": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(c)(1)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e61872-109447"
  },
  "r371": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(c)(2)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=d3e61872-109447"
  },
  "r372": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "SubTopic": "320",
   "Topic": "940",
   "URI": "http://asc.fasb.org/subtopic&trid=2176304"
  },
  "r373": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "210",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=117340910&loc=d3e59706-112781"
  },
  "r374": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(1))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r375": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(10))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r376": {
   "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=6876686&loc=d3e534808-122878"
  },
  "r377": {
   "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=6876686&loc=d3e534808-122878"
  },
  "r378": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(16))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r379": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(2))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r38": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=99393222&loc=SL20226016-175313"
  },
  "r380": {
   "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=6876686&loc=d3e534808-122878"
  },
  "r381": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(3))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r382": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(6)(a)(1))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r383": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.12)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r384": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.13,16)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r385": {
   "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=6876686&loc=d3e534808-122878"
  },
  "r386": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.15)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r387": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.17)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r388": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.2)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r389": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.3)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r39": {
   "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"
  },
  "r390": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.4)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r391": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.7(d))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r392": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.7)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r393": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(11))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r394": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(13))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r395": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.1)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r396": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.1-5)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r397": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.10)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r398": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.11)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r399": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.12)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r4": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r40": {
   "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"
  },
  "r400": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.13)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r401": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.14)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r402": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.4)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r403": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.6)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r404": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.7)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r405": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.8)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r406": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.9)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r407": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "230",
   "Subparagraph": "(a)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6477933&loc=d3e60009-112784"
  },
  "r408": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "230",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6477933&loc=d3e60009-112784"
  },
  "r409": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "320",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=75019621&loc=d3e62557-112803"
  },
  "r41": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=99393222&loc=SL20226000-175313"
  },
  "r410": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "320",
   "Subparagraph": "(b)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=75019621&loc=d3e62586-112803"
  },
  "r411": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "320",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=75019621&loc=d3e62586-112803"
  },
  "r412": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "SubTopic": "320",
   "Topic": "942",
   "URI": "http://asc.fasb.org/subtopic&trid=2209399"
  },
  "r413": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "405",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116652737&loc=d3e64164-112818"
  },
  "r414": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "470",
   "Subparagraph": "e",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=75038535&loc=d3e64711-112823"
  },
  "r415": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "470",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=75038535&loc=d3e64711-112823"
  },
  "r416": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "505",
   "Subparagraph": "(c)(1)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=117337116&loc=SL5958568-112826"
  },
  "r417": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "505",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=117337116&loc=SL5958568-112826"
  },
  "r418": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "505",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=117337116&loc=SL5958570-112826"
  },
  "r419": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1G",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "505",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=117337116&loc=SL5958577-112826"
  },
  "r42": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=99393222&loc=SL20226003-175313"
  },
  "r420": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1H",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "505",
   "Subparagraph": "(c)(2)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=117337116&loc=d3e65071-112826"
  },
  "r421": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "942",
   "URI": "http://asc.fasb.org/topic&trid=2209208"
  },
  "r422": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(16))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r423": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(23)(a)(4)(i))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r424": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(10))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r425": {
   "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=119400593&loc=d3e572229-122910"
  },
  "r426": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(15)(5))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r427": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(23)(a)(4)(ii))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r428": {
   "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=119400593&loc=d3e572229-122910"
  },
  "r429": {
   "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=119400593&loc=d3e572229-122910"
  },
  "r43": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669646-108580"
  },
  "r430": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.(a),19)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r431": {
   "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=119400593&loc=d3e572229-122910"
  },
  "r432": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(4))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116637232&loc=SL114874131-224263"
  },
  "r433": {
   "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"
  },
  "r434": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(c)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=117419784&loc=SL117783719-158441"
  },
  "r435": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "80",
   "Subparagraph": "(e)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=117420044&loc=d3e19393-158473"
  },
  "r436": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "825",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=99380617&loc=SL75241803-196195"
  },
  "r437": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.6-03(f))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=6488002&loc=d3e600178-122990"
  },
  "r438": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=66023616&loc=SL35737432-115832"
  },
  "r439": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.6-04.16(a))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=6488278&loc=d3e603758-122996"
  },
  "r44": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669646-108580"
  },
  "r440": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12(2)(i))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611133-123010"
  },
  "r441": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12C(1)(a))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611225-123010"
  },
  "r442": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-13(1))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611282-123010"
  },
  "r443": {
   "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=50485924&loc=d3e611379-123010"
  },
  "r444": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "SubTopic": "320",
   "Topic": "946",
   "URI": "http://asc.fasb.org/subtopic&trid=2324412"
  },
  "r445": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "310",
   "Subparagraph": "(SX 210.12-29(Footnote 3))",
   "Topic": "948",
   "URI": "http://asc.fasb.org/extlink&oid=6589523&loc=d3e617274-123014"
  },
  "r446": {
   "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=6589523&loc=d3e617274-123014"
  },
  "r447": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "310",
   "Subparagraph": "(SX 210.12-29)",
   "Topic": "948",
   "URI": "http://asc.fasb.org/extlink&oid=6589523&loc=d3e617274-123014"
  },
  "r448": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "450",
   "Topic": "954",
   "URI": "http://asc.fasb.org/extlink&oid=6491354&loc=d3e6049-115624"
  },
  "r449": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "450",
   "Topic": "954",
   "URI": "http://asc.fasb.org/extlink&oid=6491354&loc=d3e6052-115624"
  },
  "r45": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669646-108580"
  },
  "r450": {
   "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=6590653&loc=d3e638233-123024"
  },
  "r451": {
   "Name": "Form 10-Q",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-13"
  },
  "r452": {
   "Name": "Forms 10-K, 10-Q, 20-F",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-1-"
  },
  "r453": {
   "Name": "Regulation 12B",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b-2"
  },
  "r454": {
   "Name": "Regulation S-T",
   "Number": "232",
   "Publisher": "SEC",
   "Section": "405"
  },
  "r46": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669646-108580"
  },
  "r47": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(i),(j),(k)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669646-108580"
  },
  "r48": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669646-108580"
  },
  "r49": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=d3e637-108580"
  },
  "r5": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(22))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r50": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669686-108580"
  },
  "r51": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=d3e689-108580"
  },
  "r52": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=d3e709-108580"
  },
  "r53": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL34724391-108580"
  },
  "r54": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL34724394-108580"
  },
  "r55": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669619-108580"
  },
  "r56": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669625-108580"
  },
  "r57": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(1)(e))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868656-224227"
  },
  "r58": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(210.5-03(11))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r59": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(b)(4))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r6": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r60": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.3)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r61": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "220",
   "URI": "http://asc.fasb.org/topic&trid=2134417"
  },
  "r62": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3151-108585"
  },
  "r63": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3179-108585"
  },
  "r64": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3179-108585"
  },
  "r65": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585"
  },
  "r66": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a),(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585"
  },
  "r67": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585"
  },
  "r68": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3255-108585"
  },
  "r69": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3255-108585"
  },
  "r7": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(25))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r70": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3255-108585"
  },
  "r71": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r72": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r73": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r74": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3367-108585"
  },
  "r75": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "19",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3444-108585"
  },
  "r76": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3521-108585"
  },
  "r77": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3536-108585"
  },
  "r78": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3536-108585"
  },
  "r79": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "26",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3574-108585"
  },
  "r8": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(27))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r80": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r81": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r82": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r83": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3044-108585"
  },
  "r84": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3095-108585"
  },
  "r85": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3098-108585"
  },
  "r86": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4297-108586"
  },
  "r87": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4304-108586"
  },
  "r88": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=SL98516268-108586"
  },
  "r89": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=84158767&loc=d3e18726-107790"
  },
  "r9": {
   "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=6877327&loc=d3e13212-122682"
  },
  "r90": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=84158767&loc=d3e18780-107790"
  },
  "r91": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(k))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r92": {
   "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=26873400&loc=d3e23780-122690"
  },
  "r93": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(m)(2)(i))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r94": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08.(d),(e))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r95": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08.(e),(f))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r96": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08.(h)(1)(i))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r97": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08.(n)(2))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r98": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08.(n))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r99": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.12-04(a))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e24072-122690"
  }
 },
 "version": "2.1"
}
